Answer
No.
Details
- Debian 6
- gearmand 1.1.8 (via https://launchpad.net/gearmand)
- exactly 5000 jobs to be created via doBackground
- persist the jobs into mysql
/usr/local/sbin/gearmand -q mysql --mysql-user user1 --mysql-password pass1 --mysql-db gearmand
Scenario #1
Scenario:
- Enable READ lock for gearman queue table
Result:
- The script, which creates the background tasks, is on hold.
- After removing the READ lock, the script continues and creates all 5000 jobs successfully.
- Note: I just tested the lock for some seconds. The script might crash due to a timeout.
Scenario #2
Scenario:
- Stop the entire mysql server instance (with the gearman queue)
Result:
- Without the mysqld, the jobs cannot be created.
- 3974 jobs out of 5000 have been created.
gearmand output:
mysql_stmt_prepare failed: Can't connect to local MySQL server through socket X
PHP script output:
PHP Warning: GearmanClient::doBackground(): gearman_client_run_tasks:QUEUE_ERROR:QUEUE_ERROR
Unfortunately, with my test scenarios, the gearmand stops work if the mysql persistence layer is unavailable.