Fix an issue where followup tasks could fail to queue with string priorities
Auditors: chad
Fix an issue where followup tasks could fail to queue with string priorities Tags None Referenced Files None Subscribers None
Description
Details
Event TimelineComment Actions I think this fixes an issue with some imports, trace in the log was: Daemon 79969 STDE [Tue, 29 Sep 2015 02:47:07 +0000] [2015-09-29 02:47:07] EXCEPTION: (PhutilTypeCheckException) Parameter 'priority' has invalid type. Expected type 'optional int|null', got type 'string'. at [<phutil>/src/parser/PhutilTypeSpec.php:129] Daemon 79969 STDE [Tue, 29 Sep 2015 02:47:07 +0000] arcanist(head=master, ref.master=e8a0ebaeffaa), phabricator(head=master, ref.master=a5c417716056), phutil(head=master, ref.master=dad3ab8d7e87) Daemon 79969 STDE [Tue, 29 Sep 2015 02:47:07 +0000] #0 PhutilTypeSpec::check(string, string) called at [<phutil>/src/parser/PhutilTypeSpec.php:169] Daemon 79969 STDE [Tue, 29 Sep 2015 02:47:07 +0000] #1 PhutilTypeSpec::checkMap(array, array) called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:136] Daemon 79969 STDE [Tue, 29 Sep 2015 02:47:07 +0000] #2 PhabricatorWorker::scheduleTask(string, array, array) called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:218] Daemon 79969 STDE [Tue, 29 Sep 2015 02:47:07 +0000] #3 PhabricatorWorkerActiveTask::executeTask() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php:22] Daemon 79969 STDE [Tue, 29 Sep 2015 02:47:07 +0000] #4 PhabricatorTaskmasterDaemon::run() called at [<phutil>/src/daemon/PhutilDaemon.php:183] Daemon 79969 STDE [Tue, 29 Sep 2015 02:47:07 +0000] #5 PhutilDaemon::execute() called at [<phutil>/scripts/daemon/exec/exec_daemon.php:125] Specifically, when an int is save()'d to the database and then loaded later, it comes back as a string. This casts it back to an int. |