FirebaseExtended / firebase-queue

MIT License
786 stars 108 forks source link

Queue does not pick up task with JSON object as data #107

Open raghavdelhi opened 7 years ago

raghavdelhi commented 7 years ago

Version info

Firebase: firebase-admin@4.0.6 Firebase Queue: firebase-queue@1.6.1 Node.js: 6.9.1

Other (e.g. operating system) (if applicable): Mac OS X El Capitan

Test case

Am pushing a task with a JSON object as part of the data:

"-KbUah0a67VA82hXBSMp" : {
          "contactNumbers" : {
            "<phone number 1>" : {
              "familyName" : "",
              "fullName" : "Aditya Saraswati ",
              "givenName" : "Aditya Saraswati",
              "keywords" : {
                "aditya" : true,
                "saraswati" : true
              }
            },
            "<phone number 2>" : {
              "familyName" : "",
              "fullName" : "Aditya Saraswati ",
              "givenName" : "Aditya Saraswati",
              "keywords" : {
                "aditya" : true,
                "saraswati" : true
              }
            }
          },
          "deviceID" : "079A87D0-CCCF-4DD7-9D0E-B51AAD5D9E71",
          "taskID" : "-KbUah0a67VA82hXBSMp",
          "type" : "add",
          "uid" : "iqfJgUElLPPZK1074WCepcrwCJP2"
        }
      }

Expected behavior

Expected the queue to pick up the task. In fact, when I tested this code 1 - 2 months back it was working perfectly fine.

Actual behavior

The queue does not pick up the task if it contains a JSON object as data. If I push the same task as above without the "contactNumbers" property, the task is picked up and begins executing.