rq 0.1.7 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/INSTALL +21 -0
- data/README +752 -190
- data/TODO +18 -11
- data/TUTORIAL +230 -0
- data/all/install.rb +127 -0
- data/all/install.sh +165 -0
- data/all/packages/INSTALL +5 -0
- data/all/packages/arrayfields-3.6.0.tgz +0 -0
- data/all/packages/lockfile-1.4.1.tgz +0 -0
- data/all/packages/posixlock-0.0.1.tgz +0 -0
- data/all/packages/ruby-1.8.6.tgz +0 -0
- data/all/packages/rubygems-0.9.2.tgz +0 -0
- data/all/packages/sqlite-2.8.15.tar.gz +0 -0
- data/all/packages/sqlite-ruby-1.3.1.tar.gz +0 -0
- data/bin/rq +830 -361
- data/bin/rq-3.0.0 +860 -0
- data/doc/classes/ARGV.html +134 -0
- data/doc/classes/ARGV.src/M000036.html +36 -0
- data/doc/classes/ARGV.src/M000037.html +25 -0
- data/doc/classes/OrderedHash.html +1043 -0
- data/doc/classes/OrderedHash.src/M000003.html +26 -0
- data/doc/classes/OrderedHash.src/M000004.html +31 -0
- data/doc/classes/OrderedHash.src/M000005.html +23 -0
- data/doc/classes/OrderedHash.src/M000006.html +23 -0
- data/doc/classes/OrderedHash.src/M000007.html +24 -0
- data/doc/classes/OrderedHash.src/M000009.html +24 -0
- data/doc/classes/OrderedHash.src/M000010.html +24 -0
- data/doc/classes/OrderedHash.src/M000011.html +24 -0
- data/doc/classes/OrderedHash.src/M000012.html +24 -0
- data/doc/classes/OrderedHash.src/M000013.html +24 -0
- data/doc/classes/OrderedHash.src/M000014.html +24 -0
- data/doc/classes/OrderedHash.src/M000016.html +26 -0
- data/doc/classes/OrderedHash.src/M000017.html +25 -0
- data/doc/classes/OrderedHash.src/M000018.html +23 -0
- data/doc/classes/OrderedHash.src/M000019.html +25 -0
- data/doc/classes/OrderedHash.src/M000020.html +23 -0
- data/doc/classes/OrderedHash.src/M000021.html +24 -0
- data/doc/classes/OrderedHash.src/M000022.html +24 -0
- data/doc/classes/OrderedHash.src/M000023.html +24 -0
- data/doc/classes/OrderedHash.src/M000024.html +29 -0
- data/doc/classes/OrderedHash.src/M000025.html +29 -0
- data/doc/classes/OrderedHash.src/M000026.html +24 -0
- data/doc/classes/OrderedHash.src/M000027.html +25 -0
- data/doc/classes/OrderedHash.src/M000028.html +23 -0
- data/doc/classes/OrderedHash.src/M000029.html +25 -0
- data/doc/classes/OrderedHash.src/M000030.html +24 -0
- data/doc/classes/OrderedHash.src/M000032.html +23 -0
- data/doc/classes/OrderedHash.src/M000033.html +25 -0
- data/doc/classes/OrderedHash.src/M000034.html +36 -0
- data/doc/classes/OrderedHash.src/M000035.html +23 -0
- data/doc/classes/RQ.html +647 -0
- data/doc/classes/RQ/Backer.html +240 -0
- data/doc/classes/RQ/Backer.src/M000121.html +31 -0
- data/doc/classes/RQ/ConfigFile.html +416 -0
- data/doc/classes/RQ/ConfigFile.src/M000100.html +34 -0
- data/doc/classes/RQ/ConfigFile.src/M000101.html +26 -0
- data/doc/classes/RQ/ConfigFile.src/M000102.html +33 -0
- data/doc/classes/RQ/ConfigFile.src/M000103.html +25 -0
- data/doc/classes/RQ/ConfigFile.src/M000104.html +34 -0
- data/doc/classes/RQ/ConfigFile.src/M000105.html +25 -0
- data/doc/classes/RQ/Configurator.html +249 -0
- data/doc/classes/RQ/Configurator.src/M000122.html +40 -0
- data/doc/classes/RQ/Creator.html +264 -0
- data/doc/classes/RQ/Creator.src/M000157.html +32 -0
- data/doc/classes/RQ/Cron.html +461 -0
- data/doc/classes/RQ/Deleter.html +259 -0
- data/doc/classes/RQ/Deleter.src/M000078.html +52 -0
- data/doc/classes/RQ/Executor.html +249 -0
- data/doc/classes/RQ/Executor.src/M000099.html +45 -0
- data/doc/classes/RQ/Feeder.html +1131 -0
- data/doc/classes/RQ/Feeder.src/M000079.html +67 -0
- data/doc/classes/RQ/Feeder.src/M000080.html +47 -0
- data/doc/classes/RQ/Feeder.src/M000081.html +98 -0
- data/doc/classes/RQ/Feeder.src/M000082.html +25 -0
- data/doc/classes/RQ/Feeder.src/M000083.html +30 -0
- data/doc/classes/RQ/Feeder.src/M000084.html +58 -0
- data/doc/classes/RQ/Feeder.src/M000085.html +37 -0
- data/doc/classes/RQ/Feeder.src/M000086.html +40 -0
- data/doc/classes/RQ/Feeder.src/M000087.html +37 -0
- data/doc/classes/RQ/Feeder.src/M000088.html +35 -0
- data/doc/classes/RQ/Feeder.src/M000089.html +47 -0
- data/doc/classes/RQ/Feeder.src/M000090.html +25 -0
- data/doc/classes/RQ/Feeder.src/M000091.html +78 -0
- data/doc/classes/RQ/Feeder.src/M000092.html +34 -0
- data/doc/classes/RQ/Feeder.src/M000093.html +36 -0
- data/doc/classes/RQ/Feeder.src/M000094.html +25 -0
- data/doc/classes/RQ/Feeder.src/M000095.html +27 -0
- data/doc/classes/RQ/IOViewer.html +256 -0
- data/doc/classes/RQ/Job.html +304 -0
- data/doc/classes/RQ/Job.src/M000168.html +26 -0
- data/doc/classes/RQ/Job.src/M000169.html +37 -0
- data/doc/classes/RQ/Job.src/M000170.html +23 -0
- data/doc/classes/RQ/Job/Methods.html +210 -0
- data/doc/classes/RQ/JobQueue.html +1780 -0
- data/doc/classes/RQ/JobQueue.src/M000176.html +31 -0
- data/doc/classes/RQ/JobQueue.src/M000177.html +34 -0
- data/doc/classes/RQ/JobQueue.src/M000178.html +60 -0
- data/doc/classes/RQ/JobQueue.src/M000179.html +63 -0
- data/doc/classes/RQ/JobQueue.src/M000180.html +73 -0
- data/doc/classes/RQ/JobQueue.src/M000181.html +217 -0
- data/doc/classes/RQ/JobQueue.src/M000182.html +50 -0
- data/doc/classes/RQ/JobQueue.src/M000183.html +83 -0
- data/doc/classes/RQ/JobQueue.src/M000184.html +25 -0
- data/doc/classes/RQ/JobQueue.src/M000185.html +83 -0
- data/doc/classes/RQ/JobQueue.src/M000186.html +28 -0
- data/doc/classes/RQ/JobQueue.src/M000187.html +26 -0
- data/doc/classes/RQ/JobQueue.src/M000188.html +26 -0
- data/doc/classes/RQ/JobQueue.src/M000189.html +32 -0
- data/doc/classes/RQ/JobQueue.src/M000190.html +30 -0
- data/doc/classes/RQ/JobQueue.src/M000191.html +37 -0
- data/doc/classes/RQ/JobQueue.src/M000192.html +36 -0
- data/doc/classes/RQ/JobQueue.src/M000193.html +25 -0
- data/doc/classes/RQ/JobQueue.src/M000194.html +25 -0
- data/doc/classes/RQ/JobQueue.src/M000195.html +25 -0
- data/doc/classes/RQ/JobQueue.src/M000196.html +25 -0
- data/doc/classes/RQ/JobQueue.src/M000197.html +25 -0
- data/doc/classes/RQ/JobQueue.src/M000198.html +73 -0
- data/doc/classes/RQ/JobQueue.src/M000199.html +25 -0
- data/doc/classes/RQ/JobQueue.src/M000200.html +38 -0
- data/doc/classes/RQ/JobQueue.src/M000201.html +28 -0
- data/doc/classes/RQ/JobQueue/Error.html +187 -0
- data/doc/classes/RQ/JobRunner.html +386 -0
- data/doc/classes/RQ/JobRunner.src/M000117.html +53 -0
- data/doc/classes/RQ/JobRunner.src/M000118.html +26 -0
- data/doc/classes/RQ/JobRunnerDaemon.html +590 -0
- data/doc/classes/RQ/JobRunnerDaemon.src/M000159.html +94 -0
- data/doc/classes/RQ/JobRunnerDaemon.src/M000160.html +27 -0
- data/doc/classes/RQ/JobRunnerDaemon.src/M000161.html +39 -0
- data/doc/classes/RQ/JobRunnerDaemon.src/M000162.html +27 -0
- data/doc/classes/RQ/JobRunnerDaemon.src/M000163.html +27 -0
- data/doc/classes/RQ/JobRunnerDaemon.src/M000164.html +28 -0
- data/doc/classes/RQ/JobRunnerDaemon.src/M000165.html +28 -0
- data/doc/classes/RQ/JobRunnerDaemon.src/M000166.html +37 -0
- data/doc/classes/RQ/JobRunnerDaemon.src/M000167.html +25 -0
- data/doc/classes/RQ/Lister.html +256 -0
- data/doc/classes/RQ/Lister.src/M000156.html +52 -0
- data/doc/classes/RQ/Locker.html +250 -0
- data/doc/classes/RQ/Locker.src/M000120.html +40 -0
- data/doc/classes/RQ/Logging.html +296 -0
- data/doc/classes/RQ/Logging.src/M000067.html +28 -0
- data/doc/classes/RQ/Logging/LogClassMethods.html +254 -0
- data/doc/classes/RQ/Logging/LogClassMethods.src/M000068.html +32 -0
- data/doc/classes/RQ/Logging/LogClassMethods.src/M000069.html +28 -0
- data/doc/classes/RQ/Logging/LogMethods.html +404 -0
- data/doc/classes/RQ/Logging/LogMethods.src/M000070.html +35 -0
- data/doc/classes/RQ/Logging/LogMethods.src/M000071.html +28 -0
- data/doc/classes/RQ/Logging/LogMethods.src/M000072.html +21 -0
- data/doc/classes/RQ/Logging/LogMethods.src/M000073.html +21 -0
- data/doc/classes/RQ/Logging/LogMethods.src/M000074.html +21 -0
- data/doc/classes/RQ/Logging/LogMethods.src/M000075.html +21 -0
- data/doc/classes/RQ/Logging/LogMethods.src/M000076.html +21 -0
- data/doc/classes/RQ/Logging/LogMethods.src/M000077.html +29 -0
- data/doc/classes/RQ/Logging/LoggerExt.html +194 -0
- data/doc/classes/RQ/Main.html +2110 -0
- data/doc/classes/RQ/MainHelper.html +607 -0
- data/doc/classes/RQ/MainHelper.src/M000171.html +33 -0
- data/doc/classes/RQ/MainHelper.src/M000172.html +32 -0
- data/doc/classes/RQ/MainHelper.src/M000173.html +44 -0
- data/doc/classes/RQ/OrderedAutoHash.html +258 -0
- data/doc/classes/RQ/OrderedAutoHash.src/M000205.html +25 -0
- data/doc/classes/RQ/OrderedAutoHash.src/M000206.html +25 -0
- data/doc/classes/RQ/QDB.html +1653 -0
- data/doc/classes/RQ/QDB.src/M000126.html +25 -0
- data/doc/classes/RQ/QDB.src/M000127.html +37 -0
- data/doc/classes/RQ/QDB.src/M000128.html +27 -0
- data/doc/classes/RQ/QDB.src/M000129.html +27 -0
- data/doc/classes/RQ/QDB.src/M000130.html +27 -0
- data/doc/classes/RQ/QDB.src/M000131.html +31 -0
- data/doc/classes/RQ/QDB.src/M000132.html +32 -0
- data/doc/classes/RQ/QDB.src/M000133.html +30 -0
- data/doc/classes/RQ/QDB.src/M000134.html +91 -0
- data/doc/classes/RQ/QDB.src/M000135.html +26 -0
- data/doc/classes/RQ/QDB.src/M000136.html +46 -0
- data/doc/classes/RQ/QDB.src/M000137.html +26 -0
- data/doc/classes/RQ/QDB.src/M000138.html +51 -0
- data/doc/classes/RQ/QDB.src/M000139.html +61 -0
- data/doc/classes/RQ/QDB.src/M000140.html +57 -0
- data/doc/classes/RQ/QDB.src/M000141.html +25 -0
- data/doc/classes/RQ/QDB.src/M000142.html +25 -0
- data/doc/classes/RQ/QDB.src/M000143.html +37 -0
- data/doc/classes/RQ/QDB.src/M000144.html +107 -0
- data/doc/classes/RQ/QDB.src/M000145.html +40 -0
- data/doc/classes/RQ/QDB.src/M000146.html +34 -0
- data/doc/classes/RQ/QDB.src/M000147.html +33 -0
- data/doc/classes/RQ/QDB.src/M000148.html +32 -0
- data/doc/classes/RQ/QDB.src/M000149.html +98 -0
- data/doc/classes/RQ/QDB.src/M000150.html +26 -0
- data/doc/classes/RQ/QDB.src/M000151.html +31 -0
- data/doc/classes/RQ/QDB.src/M000154.html +26 -0
- data/doc/classes/RQ/QDB/AbortedTransactionError.html +187 -0
- data/doc/classes/RQ/QDB/RollbackTransactionError.html +187 -0
- data/doc/classes/RQ/Querier.html +328 -0
- data/doc/classes/RQ/Querier.src/M000203.html +45 -0
- data/doc/classes/RQ/Querier.src/M000204.html +78 -0
- data/doc/classes/RQ/ReSubmitter.html +307 -0
- data/doc/classes/RQ/ReSubmitter.src/M000098.html +111 -0
- data/doc/classes/RQ/Recoverer.html +247 -0
- data/doc/classes/RQ/Refresher.html +346 -0
- data/doc/classes/RQ/Refresher.src/M000174.html +51 -0
- data/doc/classes/RQ/Refresher.src/M000175.html +44 -0
- data/doc/classes/RQ/Relayer.html +723 -0
- data/doc/classes/RQ/Relayer.src/M000106.html +91 -0
- data/doc/classes/RQ/Relayer.src/M000107.html +47 -0
- data/doc/classes/RQ/Relayer.src/M000108.html +46 -0
- data/doc/classes/RQ/Relayer.src/M000109.html +26 -0
- data/doc/classes/RQ/Relayer.src/M000110.html +46 -0
- data/doc/classes/RQ/Relayer.src/M000111.html +40 -0
- data/doc/classes/RQ/Relayer.src/M000112.html +37 -0
- data/doc/classes/RQ/Relayer.src/M000113.html +40 -0
- data/doc/classes/RQ/Relayer.src/M000114.html +27 -0
- data/doc/classes/RQ/Relayer.src/M000115.html +25 -0
- data/doc/classes/RQ/Relayer.src/M000116.html +38 -0
- data/doc/classes/RQ/Resource.html +187 -0
- data/doc/classes/RQ/ResourceManager.html +276 -0
- data/doc/classes/RQ/Rotater.html +324 -0
- data/doc/classes/RQ/Rotater.src/M000158.html +71 -0
- data/doc/classes/RQ/SleepCycle.html +322 -0
- data/doc/classes/RQ/SleepCycle.src/M000123.html +32 -0
- data/doc/classes/RQ/SleepCycle.src/M000124.html +27 -0
- data/doc/classes/RQ/SleepCycle.src/M000125.html +25 -0
- data/doc/classes/RQ/Snapshotter.html +250 -0
- data/doc/classes/RQ/Snapshotter.src/M000097.html +35 -0
- data/doc/classes/RQ/StatusLister.html +289 -0
- data/doc/classes/RQ/StatusLister.src/M000096.html +26 -0
- data/doc/classes/RQ/Submitter.html +319 -0
- data/doc/classes/RQ/Submitter.src/M000119.html +92 -0
- data/doc/classes/RQ/Toucher.html +384 -0
- data/doc/classes/RQ/Updater.html +304 -0
- data/doc/classes/RQ/Updater.src/M000202.html +97 -0
- data/doc/classes/RQ/Usage.html +346 -0
- data/doc/classes/RQ/Usage.src/M000038.html +29 -0
- data/doc/classes/RQ/Usage.src/M000039.html +72 -0
- data/doc/classes/RQ/Util.html +1043 -0
- data/doc/classes/RQ/Util.src/M000040.html +27 -0
- data/doc/classes/RQ/Util.src/M000041.html +26 -0
- data/doc/classes/RQ/Util.src/M000042.html +25 -0
- data/doc/classes/RQ/Util.src/M000043.html +25 -0
- data/doc/classes/RQ/Util.src/M000044.html +30 -0
- data/doc/classes/RQ/Util.src/M000045.html +25 -0
- data/doc/classes/RQ/Util.src/M000046.html +34 -0
- data/doc/classes/RQ/Util.src/M000047.html +31 -0
- data/doc/classes/RQ/Util.src/M000048.html +41 -0
- data/doc/classes/RQ/Util.src/M000049.html +27 -0
- data/doc/classes/RQ/Util.src/M000050.html +34 -0
- data/doc/classes/RQ/Util.src/M000051.html +28 -0
- data/doc/classes/RQ/Util.src/M000052.html +27 -0
- data/doc/classes/RQ/Util.src/M000053.html +31 -0
- data/doc/classes/RQ/Util.src/M000054.html +31 -0
- data/doc/classes/RQ/Util.src/M000055.html +31 -0
- data/doc/classes/RQ/Util.src/M000056.html +25 -0
- data/doc/classes/RQ/Util.src/M000057.html +25 -0
- data/doc/classes/RQ/Util.src/M000058.html +25 -0
- data/doc/classes/RQ/Util.src/M000059.html +25 -0
- data/doc/classes/RQ/Util.src/M000060.html +25 -0
- data/doc/classes/RQ/Util.src/M000061.html +27 -0
- data/doc/classes/RQ/Util.src/M000062.html +28 -0
- data/doc/classes/RQ/Util.src/M000063.html +39 -0
- data/doc/classes/RQ/Util.src/M000064.html +39 -0
- data/doc/classes/RQ/Util.src/M000065.html +31 -0
- data/doc/classes/RQ/Util.src/M000066.html +29 -0
- data/doc/classes/SQLite.html +120 -0
- data/doc/classes/SQLite/Database.html +546 -0
- data/doc/classes/SQLite/TypeTranslator.html +221 -0
- data/doc/created.rid +1 -0
- data/doc/dot/f_0.dot +14 -0
- data/doc/dot/f_0.jpg +0 -0
- data/doc/dot/f_1.dot +14 -0
- data/doc/dot/f_1.jpg +0 -0
- data/doc/dot/f_10.dot +802 -0
- data/doc/dot/f_10.jpg +0 -0
- data/doc/dot/f_11.dot +14 -0
- data/doc/dot/f_11.jpg +0 -0
- data/doc/dot/f_12.dot +802 -0
- data/doc/dot/f_12.jpg +0 -0
- data/doc/dot/f_13.dot +802 -0
- data/doc/dot/f_13.jpg +0 -0
- data/doc/dot/f_14.dot +802 -0
- data/doc/dot/f_14.jpg +0 -0
- data/doc/dot/f_15.dot +802 -0
- data/doc/dot/f_15.jpg +0 -0
- data/doc/dot/f_16.dot +802 -0
- data/doc/dot/f_16.jpg +0 -0
- data/doc/dot/f_17.dot +802 -0
- data/doc/dot/f_17.jpg +0 -0
- data/doc/dot/f_18.dot +14 -0
- data/doc/dot/f_18.jpg +0 -0
- data/doc/dot/f_19.dot +802 -0
- data/doc/dot/f_19.jpg +0 -0
- data/doc/dot/f_2.dot +14 -0
- data/doc/dot/f_2.jpg +0 -0
- data/doc/dot/f_20.dot +802 -0
- data/doc/dot/f_20.jpg +0 -0
- data/doc/dot/f_21.dot +802 -0
- data/doc/dot/f_21.jpg +0 -0
- data/doc/dot/f_22.dot +802 -0
- data/doc/dot/f_22.jpg +0 -0
- data/doc/dot/f_23.dot +802 -0
- data/doc/dot/f_23.jpg +0 -0
- data/doc/dot/f_24.dot +802 -0
- data/doc/dot/f_24.jpg +0 -0
- data/doc/dot/f_25.dot +817 -0
- data/doc/dot/f_25.jpg +0 -0
- data/doc/dot/f_26.dot +29 -0
- data/doc/dot/f_26.jpg +0 -0
- data/doc/dot/f_27.dot +802 -0
- data/doc/dot/f_27.jpg +0 -0
- data/doc/dot/f_28.dot +802 -0
- data/doc/dot/f_28.jpg +0 -0
- data/doc/dot/f_29.dot +802 -0
- data/doc/dot/f_29.jpg +0 -0
- data/doc/dot/f_3.dot +14 -0
- data/doc/dot/f_3.jpg +0 -0
- data/doc/dot/f_30.dot +802 -0
- data/doc/dot/f_30.jpg +0 -0
- data/doc/dot/f_31.dot +802 -0
- data/doc/dot/f_31.jpg +0 -0
- data/doc/dot/f_32.dot +802 -0
- data/doc/dot/f_32.jpg +0 -0
- data/doc/dot/f_33.dot +802 -0
- data/doc/dot/f_33.jpg +0 -0
- data/doc/dot/f_34.dot +802 -0
- data/doc/dot/f_34.jpg +0 -0
- data/doc/dot/f_35.dot +802 -0
- data/doc/dot/f_35.jpg +0 -0
- data/doc/dot/f_36.dot +802 -0
- data/doc/dot/f_36.jpg +0 -0
- data/doc/dot/f_37.dot +802 -0
- data/doc/dot/f_37.jpg +0 -0
- data/doc/dot/f_38.dot +54 -0
- data/doc/dot/f_38.jpg +0 -0
- data/doc/dot/f_39.dot +802 -0
- data/doc/dot/f_39.jpg +0 -0
- data/doc/dot/f_4.dot +802 -0
- data/doc/dot/f_4.jpg +0 -0
- data/doc/dot/f_40.dot +802 -0
- data/doc/dot/f_40.jpg +0 -0
- data/doc/dot/f_41.dot +802 -0
- data/doc/dot/f_41.jpg +0 -0
- data/doc/dot/f_42.dot +802 -0
- data/doc/dot/f_42.jpg +0 -0
- data/doc/dot/f_43.dot +802 -0
- data/doc/dot/f_43.jpg +0 -0
- data/doc/dot/f_44.dot +802 -0
- data/doc/dot/f_44.jpg +0 -0
- data/doc/dot/f_5.dot +802 -0
- data/doc/dot/f_5.jpg +0 -0
- data/doc/dot/f_6.dot +802 -0
- data/doc/dot/f_6.jpg +0 -0
- data/doc/dot/f_7.dot +802 -0
- data/doc/dot/f_7.jpg +0 -0
- data/doc/dot/f_8.dot +802 -0
- data/doc/dot/f_8.jpg +0 -0
- data/doc/dot/f_9.dot +802 -0
- data/doc/dot/f_9.jpg +0 -0
- data/doc/dot/m_10_0.dot +802 -0
- data/doc/dot/m_10_0.jpg +0 -0
- data/doc/dot/m_11_0.dot +734 -0
- data/doc/dot/m_11_0.jpg +0 -0
- data/doc/dot/m_12_0.dot +802 -0
- data/doc/dot/m_12_0.jpg +0 -0
- data/doc/dot/m_13_0.dot +802 -0
- data/doc/dot/m_13_0.jpg +0 -0
- data/doc/dot/m_14_0.dot +802 -0
- data/doc/dot/m_14_0.jpg +0 -0
- data/doc/dot/m_15_0.dot +802 -0
- data/doc/dot/m_15_0.jpg +0 -0
- data/doc/dot/m_16_0.dot +802 -0
- data/doc/dot/m_16_0.jpg +0 -0
- data/doc/dot/m_17_0.dot +802 -0
- data/doc/dot/m_17_0.jpg +0 -0
- data/doc/dot/m_18_0.dot +734 -0
- data/doc/dot/m_18_0.jpg +0 -0
- data/doc/dot/m_19_0.dot +802 -0
- data/doc/dot/m_19_0.jpg +0 -0
- data/doc/dot/m_20_0.dot +802 -0
- data/doc/dot/m_20_0.jpg +0 -0
- data/doc/dot/m_21_0.dot +802 -0
- data/doc/dot/m_21_0.jpg +0 -0
- data/doc/dot/m_22_0.dot +802 -0
- data/doc/dot/m_22_0.jpg +0 -0
- data/doc/dot/m_23_0.dot +802 -0
- data/doc/dot/m_23_0.jpg +0 -0
- data/doc/dot/m_24_0.dot +802 -0
- data/doc/dot/m_24_0.jpg +0 -0
- data/doc/dot/m_25_0.dot +802 -0
- data/doc/dot/m_25_0.jpg +0 -0
- data/doc/dot/m_26_0.dot +734 -0
- data/doc/dot/m_26_0.jpg +0 -0
- data/doc/dot/m_27_0.dot +802 -0
- data/doc/dot/m_27_0.jpg +0 -0
- data/doc/dot/m_28_0.dot +802 -0
- data/doc/dot/m_28_0.jpg +0 -0
- data/doc/dot/m_29_0.dot +802 -0
- data/doc/dot/m_29_0.jpg +0 -0
- data/doc/dot/m_30_0.dot +802 -0
- data/doc/dot/m_30_0.jpg +0 -0
- data/doc/dot/m_31_0.dot +802 -0
- data/doc/dot/m_31_0.jpg +0 -0
- data/doc/dot/m_32_0.dot +802 -0
- data/doc/dot/m_32_0.jpg +0 -0
- data/doc/dot/m_33_0.dot +802 -0
- data/doc/dot/m_33_0.jpg +0 -0
- data/doc/dot/m_34_0.dot +802 -0
- data/doc/dot/m_34_0.jpg +0 -0
- data/doc/dot/m_35_0.dot +802 -0
- data/doc/dot/m_35_0.jpg +0 -0
- data/doc/dot/m_36_0.dot +802 -0
- data/doc/dot/m_36_0.jpg +0 -0
- data/doc/dot/m_37_0.dot +802 -0
- data/doc/dot/m_37_0.jpg +0 -0
- data/doc/dot/m_38_0.dot +54 -0
- data/doc/dot/m_38_0.jpg +0 -0
- data/doc/dot/m_39_0.dot +802 -0
- data/doc/dot/m_39_0.jpg +0 -0
- data/doc/dot/m_40_0.dot +802 -0
- data/doc/dot/m_40_0.jpg +0 -0
- data/doc/dot/m_41_0.dot +802 -0
- data/doc/dot/m_41_0.jpg +0 -0
- data/doc/dot/m_42_0.dot +802 -0
- data/doc/dot/m_42_0.jpg +0 -0
- data/doc/dot/m_43_0.dot +802 -0
- data/doc/dot/m_43_0.jpg +0 -0
- data/doc/dot/m_44_0.dot +802 -0
- data/doc/dot/m_44_0.jpg +0 -0
- data/doc/dot/m_4_0.dot +802 -0
- data/doc/dot/m_4_0.jpg +0 -0
- data/doc/dot/m_5_0.dot +802 -0
- data/doc/dot/m_5_0.jpg +0 -0
- data/doc/dot/m_6_0.dot +802 -0
- data/doc/dot/m_6_0.jpg +0 -0
- data/doc/dot/m_7_0.dot +802 -0
- data/doc/dot/m_7_0.jpg +0 -0
- data/doc/dot/m_8_0.dot +802 -0
- data/doc/dot/m_8_0.jpg +0 -0
- data/doc/dot/m_9_0.dot +802 -0
- data/doc/dot/m_9_0.jpg +0 -0
- data/doc/files/DEPENDS.html +107 -0
- data/doc/files/HISTORY.html +316 -0
- data/doc/files/INSTALL.html +126 -0
- data/doc/files/README.html +1223 -0
- data/doc/files/TODO.html +148 -0
- data/doc/files/TUTORIAL.html +392 -0
- data/doc/files/VERSION.html +107 -0
- data/doc/files/bin/rq_rb.html +231 -0
- data/doc/files/install_rb.html +188 -0
- data/doc/files/install_rb.src/M000001.html +53 -0
- data/doc/files/install_rb.src/M000002.html +43 -0
- data/doc/files/lib/rq-1_0_0/backer_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/configfile_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/configurator_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/creator_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/defaultconfig_txt.html +110 -0
- data/doc/files/lib/rq-1_0_0/deleter_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/executor_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/feeder_rb.html +178 -0
- data/doc/files/lib/rq-1_0_0/job_rb.html +176 -0
- data/doc/files/lib/rq-1_0_0/jobqueue_rb.html +177 -0
- data/doc/files/lib/rq-1_0_0/jobrunner_rb.html +175 -0
- data/doc/files/lib/rq-1_0_0/jobrunnerdaemon_rb.html +179 -0
- data/doc/files/lib/rq-1_0_0/lister_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/locker_rb.html +175 -0
- data/doc/files/lib/rq-1_0_0/logging_rb.html +178 -0
- data/doc/files/lib/rq-1_0_0/mainhelper_rb.html +175 -0
- data/doc/files/lib/rq-1_0_0/qdb_rb.html +177 -0
- data/doc/files/lib/rq-1_0_0/querier_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/refresher_rb.html +167 -0
- data/doc/files/lib/rq-1_0_0/relayer_rb.html +178 -0
- data/doc/files/lib/rq-1_0_0/sleepcycle_rb.html +167 -0
- data/doc/files/lib/rq-1_0_0/snapshotter_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/statuslister_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/submitter_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/updater_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/usage_rb.html +174 -0
- data/doc/files/lib/rq-1_0_0/util_rb.html +176 -0
- data/doc/files/lib/rq-2_0_0/backer_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/configfile_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/configurator_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/creator_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/defaultconfig_txt.html +110 -0
- data/doc/files/lib/rq-2_0_0/deleter_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/executor_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/feeder_rb.html +184 -0
- data/doc/files/lib/rq-2_0_0/job_rb.html +182 -0
- data/doc/files/lib/rq-2_0_0/jobqueue_rb.html +185 -0
- data/doc/files/lib/rq-2_0_0/jobrunner_rb.html +181 -0
- data/doc/files/lib/rq-2_0_0/jobrunnerdaemon_rb.html +185 -0
- data/doc/files/lib/rq-2_0_0/lister_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/locker_rb.html +181 -0
- data/doc/files/lib/rq-2_0_0/logging_rb.html +184 -0
- data/doc/files/lib/rq-2_0_0/mainhelper_rb.html +181 -0
- data/doc/files/lib/rq-2_0_0/orderedautohash_rb.html +182 -0
- data/doc/files/lib/rq-2_0_0/orderedhash_rb.html +138 -0
- data/doc/files/lib/rq-2_0_0/qdb_rb.html +184 -0
- data/doc/files/lib/rq-2_0_0/querier_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/refresher_rb.html +173 -0
- data/doc/files/lib/rq-2_0_0/relayer_rb.html +184 -0
- data/doc/files/lib/rq-2_0_0/rotater_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/sleepcycle_rb.html +173 -0
- data/doc/files/lib/rq-2_0_0/snapshotter_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/statuslister_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/submitter_rb.html +181 -0
- data/doc/files/lib/rq-2_0_0/updater_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/usage_rb.html +180 -0
- data/doc/files/lib/rq-2_0_0/util_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/backer_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/configfile_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/configurator_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/creator_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/defaultconfig_txt.html +110 -0
- data/doc/files/lib/rq-2_3_1/deleter_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/executor_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/feeder_rb.html +187 -0
- data/doc/files/lib/rq-2_3_1/job_rb.html +185 -0
- data/doc/files/lib/rq-2_3_1/jobqueue_rb.html +187 -0
- data/doc/files/lib/rq-2_3_1/jobrunner_rb.html +184 -0
- data/doc/files/lib/rq-2_3_1/jobrunnerdaemon_rb.html +187 -0
- data/doc/files/lib/rq-2_3_1/lister_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/locker_rb.html +183 -0
- data/doc/files/lib/rq-2_3_1/logging_rb.html +186 -0
- data/doc/files/lib/rq-2_3_1/mainhelper_rb.html +183 -0
- data/doc/files/lib/rq-2_3_1/orderedautohash_rb.html +184 -0
- data/doc/files/lib/rq-2_3_1/orderedhash_rb.html +138 -0
- data/doc/files/lib/rq-2_3_1/qdb_rb.html +188 -0
- data/doc/files/lib/rq-2_3_1/querier_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/refresher_rb.html +175 -0
- data/doc/files/lib/rq-2_3_1/relayer_rb.html +186 -0
- data/doc/files/lib/rq-2_3_1/resubmitter_rb.html +183 -0
- data/doc/files/lib/rq-2_3_1/rotater_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/sleepcycle_rb.html +175 -0
- data/doc/files/lib/rq-2_3_1/snapshotter_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/statuslister_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/submitter_rb.html +183 -0
- data/doc/files/lib/rq-2_3_1/updater_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/usage_rb.html +182 -0
- data/doc/files/lib/rq-2_3_1/util_rb.html +184 -0
- data/doc/files/lib/rq-2_3_1_rb.html +153 -0
- data/doc/files/lib/rq-2_3_2/backer_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/configfile_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/configurator_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/creator_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/defaultconfig_txt.html +110 -0
- data/doc/files/lib/rq-2_3_2/deleter_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/executor_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/feeder_rb.html +191 -0
- data/doc/files/lib/rq-2_3_2/ioviewer_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/job_rb.html +189 -0
- data/doc/files/lib/rq-2_3_2/jobqueue_rb.html +192 -0
- data/doc/files/lib/rq-2_3_2/jobrunner_rb.html +188 -0
- data/doc/files/lib/rq-2_3_2/jobrunnerdaemon_rb.html +191 -0
- data/doc/files/lib/rq-2_3_2/lister_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/locker_rb.html +187 -0
- data/doc/files/lib/rq-2_3_2/logging_rb.html +190 -0
- data/doc/files/lib/rq-2_3_2/mainhelper_rb.html +188 -0
- data/doc/files/lib/rq-2_3_2/orderedautohash_rb.html +188 -0
- data/doc/files/lib/rq-2_3_2/orderedhash_rb.html +138 -0
- data/doc/files/lib/rq-2_3_2/qdb_rb.html +193 -0
- data/doc/files/lib/rq-2_3_2/querier_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/recoverer_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/refresher_rb.html +179 -0
- data/doc/files/lib/rq-2_3_2/relayer_rb.html +190 -0
- data/doc/files/lib/rq-2_3_2/resubmitter_rb.html +187 -0
- data/doc/files/lib/rq-2_3_2/rotater_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/sleepcycle_rb.html +179 -0
- data/doc/files/lib/rq-2_3_2/snapshotter_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/statuslister_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/submitter_rb.html +187 -0
- data/doc/files/lib/rq-2_3_2/updater_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/usage_rb.html +186 -0
- data/doc/files/lib/rq-2_3_2/util_rb.html +188 -0
- data/doc/files/lib/rq-2_3_3/backer_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/configfile_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/configurator_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/creator_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/defaultconfig_txt.html +110 -0
- data/doc/files/lib/rq-2_3_3/deleter_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/executor_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/feeder_rb.html +191 -0
- data/doc/files/lib/rq-2_3_3/ioviewer_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/job_rb.html +189 -0
- data/doc/files/lib/rq-2_3_3/jobqueue_rb.html +192 -0
- data/doc/files/lib/rq-2_3_3/jobrunner_rb.html +188 -0
- data/doc/files/lib/rq-2_3_3/jobrunnerdaemon_rb.html +191 -0
- data/doc/files/lib/rq-2_3_3/lister_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/locker_rb.html +187 -0
- data/doc/files/lib/rq-2_3_3/logging_rb.html +190 -0
- data/doc/files/lib/rq-2_3_3/mainhelper_rb.html +188 -0
- data/doc/files/lib/rq-2_3_3/orderedautohash_rb.html +188 -0
- data/doc/files/lib/rq-2_3_3/orderedhash_rb.html +138 -0
- data/doc/files/lib/rq-2_3_3/qdb_rb.html +193 -0
- data/doc/files/lib/rq-2_3_3/querier_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/recoverer_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/refresher_rb.html +179 -0
- data/doc/files/lib/rq-2_3_3/relayer_rb.html +190 -0
- data/doc/files/lib/rq-2_3_3/resubmitter_rb.html +187 -0
- data/doc/files/lib/rq-2_3_3/rotater_rb.html +187 -0
- data/doc/files/lib/rq-2_3_3/sleepcycle_rb.html +179 -0
- data/doc/files/lib/rq-2_3_3/snapshotter_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/statuslister_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/submitter_rb.html +187 -0
- data/doc/files/lib/rq-2_3_3/updater_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/usage_rb.html +186 -0
- data/doc/files/lib/rq-2_3_3/util_rb.html +188 -0
- data/doc/files/lib/rq-3_0_0/backer_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/configfile_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/configurator_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/creator_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/cron_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/defaultconfig_txt.html +110 -0
- data/doc/files/lib/rq-3_0_0/deleter_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/executor_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/feeder_rb.html +199 -0
- data/doc/files/lib/rq-3_0_0/ioviewer_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/job_rb.html +197 -0
- data/doc/files/lib/rq-3_0_0/jobqueue_rb.html +200 -0
- data/doc/files/lib/rq-3_0_0/jobrunner_rb.html +196 -0
- data/doc/files/lib/rq-3_0_0/jobrunnerdaemon_rb.html +199 -0
- data/doc/files/lib/rq-3_0_0/lister_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/locker_rb.html +195 -0
- data/doc/files/lib/rq-3_0_0/logging_rb.html +198 -0
- data/doc/files/lib/rq-3_0_0/mainhelper_rb.html +196 -0
- data/doc/files/lib/rq-3_0_0/orderedautohash_rb.html +196 -0
- data/doc/files/lib/rq-3_0_0/orderedhash_rb.html +138 -0
- data/doc/files/lib/rq-3_0_0/qdb_rb.html +201 -0
- data/doc/files/lib/rq-3_0_0/querier_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/recoverer_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/refresher_rb.html +187 -0
- data/doc/files/lib/rq-3_0_0/relayer_rb.html +198 -0
- data/doc/files/lib/rq-3_0_0/resource_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/resourcemanager_rb.html +187 -0
- data/doc/files/lib/rq-3_0_0/resubmitter_rb.html +195 -0
- data/doc/files/lib/rq-3_0_0/rotater_rb.html +195 -0
- data/doc/files/lib/rq-3_0_0/sleepcycle_rb.html +187 -0
- data/doc/files/lib/rq-3_0_0/snapshotter_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/sqlite_rb.html +160 -0
- data/doc/files/lib/rq-3_0_0/statuslister_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/submitter_rb.html +195 -0
- data/doc/files/lib/rq-3_0_0/toucher_rb.html +195 -0
- data/doc/files/lib/rq-3_0_0/updater_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/usage_rb.html +194 -0
- data/doc/files/lib/rq-3_0_0/util_rb.html +196 -0
- data/doc/files/lib/rq_rb.html +244 -0
- data/doc/fr_class_index.html +73 -0
- data/doc/fr_file_index.html +71 -0
- data/doc/fr_method_index.html +323 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +172 -0
- data/extconf.rb +150 -0
- data/gemspec.rb +32 -0
- data/install.rb +75 -8
- data/lib/{rq-0.1.7.rb → rq-3.0.0.rb} +52 -10
- data/lib/{rq-0.1.7 → rq-3.0.0}/backer.rb +11 -7
- data/lib/{rq-0.1.7 → rq-3.0.0}/configfile.rb +21 -17
- data/lib/{rq-0.1.7 → rq-3.0.0}/configurator.rb +10 -6
- data/lib/rq-3.0.0/creator.rb +46 -0
- data/lib/rq-3.0.0/cron.rb +125 -0
- data/lib/{rq-0.1.7 → rq-3.0.0}/defaultconfig.txt +0 -0
- data/lib/rq-3.0.0/deleter.rb +51 -0
- data/lib/rq-3.0.0/executor.rb +40 -0
- data/lib/{rq-0.1.7 → rq-3.0.0}/feeder.rb +245 -91
- data/lib/rq-3.0.0/i686-linux/_sqlite.so +0 -0
- data/lib/rq-3.0.0/ioviewer.rb +48 -0
- data/lib/rq-3.0.0/job.rb +51 -0
- data/lib/rq-3.0.0/jobqueue.rb +899 -0
- data/lib/rq-3.0.0/jobrunner.rb +104 -0
- data/lib/{rq-0.1.7 → rq-3.0.0}/jobrunnerdaemon.rb +41 -27
- data/lib/rq-3.0.0/lister.rb +47 -0
- data/lib/rq-3.0.0/local/bin/sqlite +0 -0
- data/lib/rq-3.0.0/local/include/sqlite.h +868 -0
- data/lib/rq-3.0.0/local/lib/libsqlite.a +0 -0
- data/lib/rq-3.0.0/local/lib/libsqlite.la +35 -0
- data/lib/rq-3.0.0/local/lib/libsqlite.so +0 -0
- data/lib/rq-3.0.0/local/lib/libsqlite.so.0 +0 -0
- data/lib/rq-3.0.0/local/lib/libsqlite.so.0.8.6 +0 -0
- data/lib/rq-3.0.0/local/lib/pkgconfig/sqlite.pc +12 -0
- data/lib/{rq-0.1.7 → rq-3.0.0}/locker.rb +12 -6
- data/lib/{rq-0.1.7 → rq-3.0.0}/logging.rb +49 -42
- data/lib/rq-3.0.0/mainhelper.rb +184 -0
- data/lib/rq-3.0.0/orderedautohash.rb +39 -0
- data/lib/rq-3.0.0/orderedhash.rb +240 -0
- data/lib/{rq-0.1.7 → rq-3.0.0}/qdb.rb +183 -84
- data/lib/rq-3.0.0/querier.rb +98 -0
- data/lib/rq-3.0.0/recoverer.rb +28 -0
- data/lib/{rq-0.1.7 → rq-3.0.0}/refresher.rb +16 -8
- data/lib/rq-3.0.0/relayer.rb +283 -0
- data/lib/rq-3.0.0/resource.rb +22 -0
- data/lib/rq-3.0.0/resourcemanager.rb +40 -0
- data/lib/rq-3.0.0/resubmitter.rb +96 -0
- data/lib/rq-3.0.0/rotater.rb +98 -0
- data/lib/{rq-0.1.7 → rq-3.0.0}/sleepcycle.rb +14 -14
- data/lib/rq-3.0.0/snapshotter.rb +40 -0
- data/lib/rq-3.0.0/sqlite.rb +293 -0
- data/lib/rq-3.0.0/statuslister.rb +48 -0
- data/lib/rq-3.0.0/submitter.rb +109 -0
- data/lib/rq-3.0.0/toucher.rb +177 -0
- data/lib/rq-3.0.0/updater.rb +95 -0
- data/lib/rq-3.0.0/usage.rb +1157 -0
- data/lib/{rq-0.1.7 → rq-3.0.0}/util.rb +74 -56
- data/lib/rq.rb +52 -12
- data/rdoc.sh +17 -0
- data/rq +3 -1
- data/white_box/joblist +8 -0
- metadata +779 -96
- data/DEPENDS +0 -5
- data/HISTORY +0 -26
- data/VERSION +0 -1
- data/bin/rq-0.1.7 +0 -410
- data/lib/rq-0.1.7/creator.rb +0 -23
- data/lib/rq-0.1.7/deleter.rb +0 -39
- data/lib/rq-0.1.7/executor.rb +0 -41
- data/lib/rq-0.1.7/job.rb +0 -51
- data/lib/rq-0.1.7/jobqueue.rb +0 -432
- data/lib/rq-0.1.7/jobrunner.rb +0 -63
- data/lib/rq-0.1.7/lister.rb +0 -22
- data/lib/rq-0.1.7/mainhelper.rb +0 -53
- data/lib/rq-0.1.7/querier.rb +0 -33
- data/lib/rq-0.1.7/snapshotter.rb +0 -25
- data/lib/rq-0.1.7/statuslister.rb +0 -22
- data/lib/rq-0.1.7/submitter.rb +0 -90
- data/lib/rq-0.1.7/updater.rb +0 -95
- data/lib/rq-0.1.7/usage.rb +0 -609
- data/rdoc.cmd +0 -2
- data/rq.gemspec +0 -36
- data/rq.help +0 -552
data/bin/rq-3.0.0
ADDED
@@ -0,0 +1,860 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
#
|
4
|
+
# === the rq program
|
5
|
+
#
|
6
|
+
# the rq program is the single command line interface by which all queue
|
7
|
+
# operations are affected. it always takes, as it's first argument, the name of
|
8
|
+
# the queue to be operated on. the second argument is always the mode of
|
9
|
+
# operation. the action taken and meaning of subsequent arguments depends
|
10
|
+
# directory on the mode of operation. for example the command
|
11
|
+
#
|
12
|
+
# rq queue create
|
13
|
+
#
|
14
|
+
# has the the mode _create_ and will create the queue _queue_. similarly the
|
15
|
+
# command
|
16
|
+
#
|
17
|
+
# rq queue submit my_job.sh huge_input_file.dat
|
18
|
+
#
|
19
|
+
# runs in _submit_ mode and will sumbit a job to _queue_.
|
20
|
+
#
|
21
|
+
# run
|
22
|
+
#
|
23
|
+
# rq --help
|
24
|
+
#
|
25
|
+
# or see README
|
26
|
+
#
|
27
|
+
# for the detailed instructions for each of the operation modes
|
28
|
+
#
|
29
|
+
|
30
|
+
require 'rq-3.0.0'
|
31
|
+
module RQ
|
32
|
+
#
|
33
|
+
# the Main class is responsible for parsing command line paramters and
|
34
|
+
# switches, doing some validation, initializing logging, and, ultimately,
|
35
|
+
# delegating the bulk of the work to a MainHelper based on the _mode_ given.
|
36
|
+
# the relationship between Main and MainHelper is a tight one by design - the
|
37
|
+
# primary purpose of it being to prevent the Main class from becoming 10000
|
38
|
+
# lines long. the delegators used include:
|
39
|
+
#
|
40
|
+
# * Creator
|
41
|
+
# * Submitter
|
42
|
+
# * Lister
|
43
|
+
# * StatusLister
|
44
|
+
# * Deleter
|
45
|
+
# * Updater
|
46
|
+
# * Querier
|
47
|
+
# * Executor
|
48
|
+
# * Configurator
|
49
|
+
# * Snapshotter
|
50
|
+
# * Locker
|
51
|
+
# * Backer
|
52
|
+
# * Rotater
|
53
|
+
# * Feeder
|
54
|
+
# * IOViewer
|
55
|
+
#
|
56
|
+
class Main
|
57
|
+
#--{{{
|
58
|
+
include Util
|
59
|
+
include Logging
|
60
|
+
include Usage
|
61
|
+
|
62
|
+
# an enumeration of option specifications used to parse command line
|
63
|
+
OPTSPEC =
|
64
|
+
#--{{{
|
65
|
+
[
|
66
|
+
[
|
67
|
+
'--priority=priority', '-p',
|
68
|
+
'modes <submit, resubmit> : set the job(s) priority - lowest(0) .. highest(n) - (default 0)'
|
69
|
+
],
|
70
|
+
[
|
71
|
+
'--tag=tag', '-t',
|
72
|
+
'modes <submit, resubmit> : set the job(s) user data tag'
|
73
|
+
],
|
74
|
+
[
|
75
|
+
'--runner=runner',
|
76
|
+
'modes <submit, resubmit> : set the job(s) required runner(s)'
|
77
|
+
],
|
78
|
+
[
|
79
|
+
'--restartable',
|
80
|
+
'modes <submit, resubmit> : set the job(s) to be restartable on node reboot'
|
81
|
+
],
|
82
|
+
[
|
83
|
+
'--stage',
|
84
|
+
'modes <submit, resubmit> : set the job(s) initial state to be holding (default pending)'
|
85
|
+
],
|
86
|
+
[
|
87
|
+
'--infile=infile', '-i',
|
88
|
+
'modes <submit, resubmit> : infile'
|
89
|
+
],
|
90
|
+
[
|
91
|
+
'--stdin=[stdin]', '-s',
|
92
|
+
'modes <submit, resubmit, update> : stdin'
|
93
|
+
],
|
94
|
+
|
95
|
+
[
|
96
|
+
'--quiet', '-q',
|
97
|
+
'modes <submit, resubmit, feed> : do not echo submitted jobs, fail silently if
|
98
|
+
another process is already feeding'
|
99
|
+
],
|
100
|
+
[
|
101
|
+
'--daemon', '-D',
|
102
|
+
'modes <feed> : spawn a daemon'
|
103
|
+
],
|
104
|
+
[
|
105
|
+
'--max_feed=max_feed',
|
106
|
+
'modes <feed> : the maximum number of concurrent jobs run'
|
107
|
+
],
|
108
|
+
[
|
109
|
+
'--retries=retries',
|
110
|
+
'modes <feed> : specify transaction retries'
|
111
|
+
],
|
112
|
+
[
|
113
|
+
'--min_sleep=min_sleep',
|
114
|
+
'modes <feed> : specify min sleep'
|
115
|
+
],
|
116
|
+
[
|
117
|
+
'--max_sleep=max_sleep',
|
118
|
+
'modes <feed> : specify max sleep'
|
119
|
+
],
|
120
|
+
[
|
121
|
+
'--exit=exit_code_map',
|
122
|
+
'modes <status> : specify and exit code map'
|
123
|
+
],
|
124
|
+
[
|
125
|
+
'--fields=fields', '-f',
|
126
|
+
'limit which fields of output to display'
|
127
|
+
],
|
128
|
+
[
|
129
|
+
'--snapshot', '-s',
|
130
|
+
'operate on snapshot of queue'
|
131
|
+
],
|
132
|
+
[
|
133
|
+
'--editor=editor', '-e',
|
134
|
+
'editor command capable of opening multiple files at once = (default ENV["RQ_EDITOR"] || "vim -R -o")'
|
135
|
+
],
|
136
|
+
[
|
137
|
+
'--verbosity=verbostiy', '-v',
|
138
|
+
'0|fatal < 1|error < 2|warn < 3|info < 4|debug - (default info)'
|
139
|
+
],
|
140
|
+
[
|
141
|
+
'--log=path','-l',
|
142
|
+
'set log file - (default stderr)'
|
143
|
+
],
|
144
|
+
[
|
145
|
+
'--log_age=log_age',
|
146
|
+
'daily | weekly | monthly - what age will cause log rolling (default nil)'
|
147
|
+
],
|
148
|
+
[
|
149
|
+
'--log_size=log_size',
|
150
|
+
'size in bytes - what size will cause log rolling (default nil)'
|
151
|
+
],
|
152
|
+
[
|
153
|
+
'--dot_rq_dir=[dot_rq_dir]',
|
154
|
+
'base dir for log/pidfile storage (default ~/.rq/full/path/to/queue)'
|
155
|
+
],
|
156
|
+
# [
|
157
|
+
# '--config=path',
|
158
|
+
# 'valid path - specify config file (default nil)'
|
159
|
+
# ],
|
160
|
+
# [
|
161
|
+
# '--template=[path]',
|
162
|
+
# 'valid path - generate a template config file in path (default stdout)'
|
163
|
+
# ],
|
164
|
+
[
|
165
|
+
'--help', '-h',
|
166
|
+
'this message'
|
167
|
+
],
|
168
|
+
[
|
169
|
+
'--version',
|
170
|
+
'show version number'
|
171
|
+
],
|
172
|
+
]
|
173
|
+
#--}}}
|
174
|
+
|
175
|
+
# the default config file searched for has this basename
|
176
|
+
CONFIG_DEFAULT_PATH = 'rq.conf'
|
177
|
+
|
178
|
+
# config files are searched for using this list of locations
|
179
|
+
CONFIG_SEARCH_PATH = %w( . ~ /dmsp/reference/etc /usr/local/etc /usr/etc /etc )
|
180
|
+
|
181
|
+
# the queue can be specified in the environment
|
182
|
+
Q = ENV['RQ_Q'] || ENV['RQ_QUEUE']
|
183
|
+
|
184
|
+
attr :logger
|
185
|
+
attr :argv
|
186
|
+
attr :env
|
187
|
+
attr :stdin
|
188
|
+
attr :job_stdin
|
189
|
+
attr :cmd
|
190
|
+
attr :options
|
191
|
+
attr :qpath
|
192
|
+
attr :mode
|
193
|
+
attr :q
|
194
|
+
attr :daemon
|
195
|
+
attr :quiet
|
196
|
+
attr :fields
|
197
|
+
attr :dot_rq_dir
|
198
|
+
|
199
|
+
alias_method 'stdin?', 'stdin'
|
200
|
+
alias_method 'job_stdin?', 'job_stdin'
|
201
|
+
alias_method 'quiet?', 'quiet'
|
202
|
+
|
203
|
+
# given a command line and environment run the rq program
|
204
|
+
def initialize argv = ARGV, env = ENV
|
205
|
+
#--{{{
|
206
|
+
begin
|
207
|
+
@logger = Logger::new STDERR
|
208
|
+
@argv = Util::mcp(argv.to_a)
|
209
|
+
@env = Util::mcp(env.to_hash)
|
210
|
+
@cmd = ([File::expand_path($0)] + ARGV).join(' ')
|
211
|
+
@stdin = parse_stdin
|
212
|
+
|
213
|
+
parse_options
|
214
|
+
|
215
|
+
if(@options.has_key?('name'))
|
216
|
+
$0 = ([@options['name']] + ARGV).join(' ')
|
217
|
+
end
|
218
|
+
|
219
|
+
if(@options.has_key?('help') or @argv.include?('help'))
|
220
|
+
usage('port' => STDOUT, 'long' => true)
|
221
|
+
exit EXIT_SUCCESS
|
222
|
+
end
|
223
|
+
|
224
|
+
if(@options.has_key?('template') or (idx = @argv.index('template')))
|
225
|
+
gen_template(@options['template'] || @argv[idx + 1])
|
226
|
+
exit EXIT_SUCCESS
|
227
|
+
end
|
228
|
+
|
229
|
+
if @options.has_key?('version')
|
230
|
+
puts RQ::VERSION
|
231
|
+
exit EXIT_SUCCESS
|
232
|
+
end
|
233
|
+
|
234
|
+
if(@options.has_key?('stdin'))
|
235
|
+
@options['stdin'] ||= '-'
|
236
|
+
@job_stdin = @options['stdin']
|
237
|
+
end
|
238
|
+
|
239
|
+
if(@options.has_key?('quiet'))
|
240
|
+
@quiet = true
|
241
|
+
end
|
242
|
+
|
243
|
+
if(@options.has_key?('fields'))
|
244
|
+
@fields = @options['fields'].split(%r/,/).map{|f| f.strip}
|
245
|
+
@fields.uniq!
|
246
|
+
end
|
247
|
+
|
248
|
+
parse_argv
|
249
|
+
|
250
|
+
setup_dot_rq_dir
|
251
|
+
|
252
|
+
status = run
|
253
|
+
|
254
|
+
case status
|
255
|
+
when Integer
|
256
|
+
exit status
|
257
|
+
else
|
258
|
+
exit(status ? EXIT_SUCCESS : EXIT_FAILURE)
|
259
|
+
end
|
260
|
+
rescue => e
|
261
|
+
unless SystemExit === e
|
262
|
+
logerr e
|
263
|
+
exit EXIT_FAILURE
|
264
|
+
else
|
265
|
+
exit e.status
|
266
|
+
end
|
267
|
+
end
|
268
|
+
#--}}}
|
269
|
+
end
|
270
|
+
# extract command lines args
|
271
|
+
def parse_argv
|
272
|
+
#--{{{
|
273
|
+
@qpath = Q || @argv.shift
|
274
|
+
@mode = @argv.shift
|
275
|
+
#--}}}
|
276
|
+
end
|
277
|
+
# determine storage for logs/pidfiles
|
278
|
+
def setup_dot_rq_dir
|
279
|
+
#--{{{
|
280
|
+
if(@options.has_key?('dot_rq_dir'))
|
281
|
+
@dot_rq_dir = @options['dot_rq_dir']
|
282
|
+
end
|
283
|
+
if @dot_rq_dir.nil?
|
284
|
+
home = ENV['HOME'] || File::expand_path('~') rescue abort("ENV['HOME'] is unset!")
|
285
|
+
@dot_rq_dir = File::join home, '.rq', @qpath
|
286
|
+
end
|
287
|
+
FileUtils.mkdir_p @dot_rq_dir
|
288
|
+
#--}}}
|
289
|
+
end
|
290
|
+
# select a MainHelper based on mode and delegate to it
|
291
|
+
def run
|
292
|
+
#--{{{
|
293
|
+
@qpath = Util::realpath @qpath
|
294
|
+
|
295
|
+
if @mode.nil? or @mode.strip.empty?
|
296
|
+
usage 'port' => STDERR, 'long' => false
|
297
|
+
exit EXIT_FAILURE
|
298
|
+
end
|
299
|
+
|
300
|
+
shortcuts = {
|
301
|
+
'c' => 'create',
|
302
|
+
's' => 'submit',
|
303
|
+
'r' => 'resubmit',
|
304
|
+
're' => 'resubmit',
|
305
|
+
'l' => 'list',
|
306
|
+
'ls' => 'list',
|
307
|
+
't' => 'status',
|
308
|
+
'd' => 'delete',
|
309
|
+
'rm' => 'delete',
|
310
|
+
'u' => 'update',
|
311
|
+
'q' => 'query',
|
312
|
+
'e' => 'execute',
|
313
|
+
'C' => 'configure',
|
314
|
+
'S' => 'snapshot',
|
315
|
+
'L' => 'lock',
|
316
|
+
'B' => 'backup',
|
317
|
+
'R' => 'rotate',
|
318
|
+
'h' => 'help',
|
319
|
+
'H' => 'help',
|
320
|
+
'f' => 'feed',
|
321
|
+
'io' => 'ioview',
|
322
|
+
'0' => 'stdin',
|
323
|
+
'1' => 'stdout',
|
324
|
+
'2' => 'stderr',
|
325
|
+
'to' => 'touch',
|
326
|
+
'ta' => 'tail',
|
327
|
+
'cron' => 'cron',
|
328
|
+
}
|
329
|
+
|
330
|
+
if((longmode = shortcuts[@mode]))
|
331
|
+
@mode = longmode
|
332
|
+
end
|
333
|
+
|
334
|
+
begin
|
335
|
+
case @mode
|
336
|
+
when 'create'
|
337
|
+
create
|
338
|
+
when 'submit'
|
339
|
+
submit
|
340
|
+
when 'resubmit'
|
341
|
+
resubmit
|
342
|
+
when 'list'
|
343
|
+
list
|
344
|
+
when 'status'
|
345
|
+
status
|
346
|
+
when 'delete'
|
347
|
+
delete
|
348
|
+
when 'update'
|
349
|
+
update
|
350
|
+
when 'query'
|
351
|
+
query
|
352
|
+
when 'execute'
|
353
|
+
execute
|
354
|
+
when 'configure'
|
355
|
+
configure
|
356
|
+
when 'snapshot'
|
357
|
+
snapshot
|
358
|
+
when 'lock'
|
359
|
+
lock
|
360
|
+
when 'backup'
|
361
|
+
backup
|
362
|
+
when 'rotate'
|
363
|
+
rotate
|
364
|
+
when 'help'
|
365
|
+
usage 'port' => STDOUT, 'long' => true
|
366
|
+
exit EXIT_SUCCESS
|
367
|
+
when 'feed'
|
368
|
+
feed
|
369
|
+
when 'start'
|
370
|
+
start
|
371
|
+
when 'shutdown'
|
372
|
+
shutdown
|
373
|
+
when 'stop'
|
374
|
+
stop
|
375
|
+
when 'restart'
|
376
|
+
restart
|
377
|
+
when 'pid'
|
378
|
+
pid
|
379
|
+
when 'feeder'
|
380
|
+
feeder
|
381
|
+
when 'recover'
|
382
|
+
recover
|
383
|
+
when 'ioview'
|
384
|
+
ioview
|
385
|
+
when 'stdin'
|
386
|
+
dump_stdin
|
387
|
+
when 'stdout'
|
388
|
+
dump_stdout
|
389
|
+
when 'stderr'
|
390
|
+
dump_stderr
|
391
|
+
when 'stdin4'
|
392
|
+
stdin4
|
393
|
+
when 'stdout4'
|
394
|
+
stdout4
|
395
|
+
when 'stderr4'
|
396
|
+
stderr4
|
397
|
+
when 'touch'
|
398
|
+
touch
|
399
|
+
when 'tail'
|
400
|
+
tail
|
401
|
+
when 'cron'
|
402
|
+
cron
|
403
|
+
else
|
404
|
+
raise "invalid mode <#{ @mode }>"
|
405
|
+
end
|
406
|
+
self
|
407
|
+
rescue Errno::EPIPE => e
|
408
|
+
raise if STDOUT.tty?
|
409
|
+
end
|
410
|
+
|
411
|
+
EXIT_SUCCESS
|
412
|
+
#--}}}
|
413
|
+
end
|
414
|
+
# delegated to a Creator
|
415
|
+
def create
|
416
|
+
#--{{{
|
417
|
+
init_logging
|
418
|
+
creator = Creator::new self
|
419
|
+
creator.create
|
420
|
+
#--}}}
|
421
|
+
end
|
422
|
+
# delegated to a Submitter
|
423
|
+
def submit
|
424
|
+
#--{{{
|
425
|
+
init_logging
|
426
|
+
submitter = Submitter::new self
|
427
|
+
submitter.submit
|
428
|
+
#--}}}
|
429
|
+
end
|
430
|
+
# delegated to a ReSubmitter
|
431
|
+
def resubmit
|
432
|
+
#--{{{
|
433
|
+
init_logging
|
434
|
+
resubmitter = ReSubmitter::new self
|
435
|
+
resubmitter.resubmit
|
436
|
+
#--}}}
|
437
|
+
end
|
438
|
+
# delegated to a Lister
|
439
|
+
def list
|
440
|
+
#--{{{
|
441
|
+
init_logging
|
442
|
+
@options['snapshot'] = true
|
443
|
+
lister = Lister::new self
|
444
|
+
lister.list
|
445
|
+
#--}}}
|
446
|
+
end
|
447
|
+
# delegated to a StatusLister
|
448
|
+
def status
|
449
|
+
#--{{{
|
450
|
+
init_logging
|
451
|
+
@options['snapshot'] = true
|
452
|
+
statuslister = StatusLister::new self
|
453
|
+
statuslister.statuslist
|
454
|
+
#--}}}
|
455
|
+
end
|
456
|
+
# delegated to a Deleter
|
457
|
+
def delete
|
458
|
+
#--{{{
|
459
|
+
init_logging
|
460
|
+
deleter = Deleter::new self
|
461
|
+
deleter.delete
|
462
|
+
#--}}}
|
463
|
+
end
|
464
|
+
# delegated to a Updater
|
465
|
+
def update
|
466
|
+
#--{{{
|
467
|
+
init_logging
|
468
|
+
updater = Updater::new self
|
469
|
+
updater.update
|
470
|
+
#--}}}
|
471
|
+
end
|
472
|
+
# delegated to a Querier
|
473
|
+
def query
|
474
|
+
#--{{{
|
475
|
+
init_logging
|
476
|
+
querier = Querier::new self
|
477
|
+
querier.query
|
478
|
+
#--}}}
|
479
|
+
end
|
480
|
+
# delegated to a Executor
|
481
|
+
def execute
|
482
|
+
#--{{{
|
483
|
+
init_logging
|
484
|
+
executor = Executor::new self
|
485
|
+
executor.execute
|
486
|
+
#--}}}
|
487
|
+
end
|
488
|
+
# delegated to a Configurator
|
489
|
+
def configure
|
490
|
+
#--{{{
|
491
|
+
init_logging
|
492
|
+
configurator = Configurator::new self
|
493
|
+
configurator.configure
|
494
|
+
#--}}}
|
495
|
+
end
|
496
|
+
# delegated to a Snapshotter
|
497
|
+
def snapshot
|
498
|
+
#--{{{
|
499
|
+
init_logging
|
500
|
+
snapshotter = Snapshotter::new self
|
501
|
+
snapshotter.snapshot
|
502
|
+
#--}}}
|
503
|
+
end
|
504
|
+
# delegated to a Locker
|
505
|
+
def lock
|
506
|
+
#--{{{
|
507
|
+
init_logging
|
508
|
+
locker = Locker::new self
|
509
|
+
locker.lock
|
510
|
+
#--}}}
|
511
|
+
end
|
512
|
+
# delegated to a Backer
|
513
|
+
def backup
|
514
|
+
#--{{{
|
515
|
+
init_logging
|
516
|
+
backer = Backer::new self
|
517
|
+
backer.backup
|
518
|
+
#--}}}
|
519
|
+
end
|
520
|
+
# delegated to a Rotater
|
521
|
+
def rotate
|
522
|
+
#--{{{
|
523
|
+
init_logging
|
524
|
+
rotater = Rotater::new self
|
525
|
+
rotater.rotate
|
526
|
+
#--}}}
|
527
|
+
end
|
528
|
+
# delegated to a Feeder
|
529
|
+
def feed
|
530
|
+
#--{{{
|
531
|
+
feeder = Feeder::new self
|
532
|
+
feeder.feed
|
533
|
+
#--}}}
|
534
|
+
end
|
535
|
+
# quietly start a daemon process
|
536
|
+
def start
|
537
|
+
#--{{{
|
538
|
+
unless exists
|
539
|
+
@options['daemon'] = true
|
540
|
+
@options['quiet'] = true
|
541
|
+
@options['log'] ||= File.join(@dot_rq_dir, 'log')
|
542
|
+
feeder = Feeder::new self
|
543
|
+
feeder.feed
|
544
|
+
end
|
545
|
+
#--}}}
|
546
|
+
end
|
547
|
+
# clean stop
|
548
|
+
def shutdown
|
549
|
+
#--{{{
|
550
|
+
pid = (exists and signal_feeder('TERM'))
|
551
|
+
puts "pid <#{ pid }> signaled to stop a.s.a.p" if pid
|
552
|
+
exit(Integer === pid ? 0 : 1)
|
553
|
+
#--}}}
|
554
|
+
end
|
555
|
+
# hard stop
|
556
|
+
def stop
|
557
|
+
#--{{{
|
558
|
+
pid = (exists and signal_feeder('KILL'))
|
559
|
+
puts "pid <#{ pid }> signaled to stop now" if pid
|
560
|
+
exit(Integer === pid ? 0 : 1)
|
561
|
+
#--}}}
|
562
|
+
end
|
563
|
+
# sighup based restart
|
564
|
+
def restart
|
565
|
+
#--{{{
|
566
|
+
pid = (exists and signal_feeder('HUP'))
|
567
|
+
puts "pid <#{ pid }> signaled to restart" if pid
|
568
|
+
exit(Integer === pid ? 0 : 1)
|
569
|
+
#--}}}
|
570
|
+
end
|
571
|
+
# is a feeder running?
|
572
|
+
def feeder
|
573
|
+
#--{{{
|
574
|
+
arg = @argv.shift
|
575
|
+
case arg
|
576
|
+
when /pid/
|
577
|
+
pid
|
578
|
+
else
|
579
|
+
puts "---\nfeeder : #{ exists ? true : false }"
|
580
|
+
end
|
581
|
+
#--}}}
|
582
|
+
end
|
583
|
+
# pid of any running feeder
|
584
|
+
def pid
|
585
|
+
#--{{{
|
586
|
+
puts "---\npid : #{ exists || '~' }"
|
587
|
+
#--}}}
|
588
|
+
end
|
589
|
+
# attempt sqlite db recovery
|
590
|
+
def recover
|
591
|
+
#--{{{
|
592
|
+
init_logging
|
593
|
+
recoverer = Recoverer::new self
|
594
|
+
recoverer.recover
|
595
|
+
#--}}}
|
596
|
+
end
|
597
|
+
# spawn external process to view stdin/stdout/stderr of jids
|
598
|
+
def ioview
|
599
|
+
#--{{{
|
600
|
+
init_logging
|
601
|
+
ioviewer = IOViewer::new self
|
602
|
+
ioviewer.ioview
|
603
|
+
#--}}}
|
604
|
+
end
|
605
|
+
# dump stdin for jid
|
606
|
+
def dump_stdin
|
607
|
+
#--{{{
|
608
|
+
dump_ios 'stdin', jids4(@argv)
|
609
|
+
#--}}}
|
610
|
+
end
|
611
|
+
# dump stdout for jid
|
612
|
+
def dump_stdout
|
613
|
+
#--{{{
|
614
|
+
dump_ios 'stdout', jids4(@argv)
|
615
|
+
#--}}}
|
616
|
+
end
|
617
|
+
# dump stderr for jid
|
618
|
+
def dump_stderr
|
619
|
+
#--{{{
|
620
|
+
dump_ios 'stderr', jids4(@argv)
|
621
|
+
#--}}}
|
622
|
+
end
|
623
|
+
# dump stdin path for jid
|
624
|
+
def stdin4 jids = nil
|
625
|
+
#--{{{
|
626
|
+
if jids
|
627
|
+
File.join @qpath, 'stdin', jids.to_s
|
628
|
+
else
|
629
|
+
jids = jids4 @argv
|
630
|
+
#STDOUT << "---\n"
|
631
|
+
jids.flatten.each do |jid|
|
632
|
+
iopath = File.join @qpath, 'stdin', jid.to_s
|
633
|
+
#STDOUT << " - " << iopath << "\n"
|
634
|
+
puts iopath
|
635
|
+
end
|
636
|
+
end
|
637
|
+
#--}}}
|
638
|
+
end
|
639
|
+
# dump stdout path for jid
|
640
|
+
def stdout4 jids = nil
|
641
|
+
#--{{{
|
642
|
+
if jids
|
643
|
+
File.join @qpath, 'stdout', jids.to_s
|
644
|
+
else
|
645
|
+
jids = jids4 @argv
|
646
|
+
#STDOUT << "---\n"
|
647
|
+
jids.flatten.each do |jid|
|
648
|
+
iopath = File.join @qpath, 'stdout', jid.to_s
|
649
|
+
#STDOUT << " - " << iopath << "\n"
|
650
|
+
puts iopath
|
651
|
+
end
|
652
|
+
end
|
653
|
+
#--}}}
|
654
|
+
end
|
655
|
+
# dump stderr path for jid
|
656
|
+
def stderr4 jids = nil
|
657
|
+
#--{{{
|
658
|
+
if jids
|
659
|
+
File.join @qpath, 'stderr', jids.to_s
|
660
|
+
else
|
661
|
+
jids = jids4 @argv
|
662
|
+
#STDOUT << "---\n"
|
663
|
+
jids.flatten.each do |jid|
|
664
|
+
iopath = File.join @qpath, 'stderr', jid.to_s
|
665
|
+
#STDOUT << " - " << iopath << "\n"
|
666
|
+
puts iopath
|
667
|
+
end
|
668
|
+
end
|
669
|
+
#--}}}
|
670
|
+
end
|
671
|
+
# delegated to a Toucher
|
672
|
+
def touch
|
673
|
+
#--{{{
|
674
|
+
init_logging
|
675
|
+
toucher = Toucher::new self
|
676
|
+
toucher.touch
|
677
|
+
#--}}}
|
678
|
+
end
|
679
|
+
# spawn external process to tail stdin/stdout/stderr of jids
|
680
|
+
def tail
|
681
|
+
#--{{{
|
682
|
+
@options['editor'] = 'tail -F'
|
683
|
+
init_logging
|
684
|
+
ioviewer = IOViewer::new self
|
685
|
+
ioviewer.ioview rescue nil
|
686
|
+
#--}}}
|
687
|
+
end
|
688
|
+
# add/delete crontab entry
|
689
|
+
def cron
|
690
|
+
#--{{{
|
691
|
+
init_logging
|
692
|
+
cron = Cron::new self
|
693
|
+
cron.cron
|
694
|
+
#--}}}
|
695
|
+
end
|
696
|
+
|
697
|
+
def dump_ios which, jids
|
698
|
+
#--{{{
|
699
|
+
jids.each do |jid|
|
700
|
+
iopath = send "#{ which }4", jid
|
701
|
+
begin
|
702
|
+
cat iopath
|
703
|
+
rescue
|
704
|
+
next
|
705
|
+
end
|
706
|
+
end
|
707
|
+
#--}}}
|
708
|
+
end
|
709
|
+
def cat path
|
710
|
+
#--{{{
|
711
|
+
system("cat #{ path } 2>/dev/null") or open(path){|f| f.each{|line| print line}}
|
712
|
+
#--}}}
|
713
|
+
end
|
714
|
+
def jids4 *list
|
715
|
+
#--{{{
|
716
|
+
jids = list.flatten.map{|elem| Integer elem}
|
717
|
+
#@stdin.each{|line| line.strip!; next if line.empty?; jids << line} if @stdin
|
718
|
+
if @stdin
|
719
|
+
mainhelper = MainHelper.new(self)
|
720
|
+
jobs = []
|
721
|
+
mainhelper.loadio @stdin, 'stdin', jobs
|
722
|
+
jobs.each{|job| jids << job['jid']}
|
723
|
+
jids.map!{|jid| Integer(jid) rescue abort("bad jid <#{ jid.inspect }>")}
|
724
|
+
end
|
725
|
+
jids
|
726
|
+
#--}}}
|
727
|
+
end
|
728
|
+
|
729
|
+
def exists
|
730
|
+
#--{{{
|
731
|
+
begin
|
732
|
+
signal_feeder 0
|
733
|
+
rescue Errno::ESRCH
|
734
|
+
false
|
735
|
+
end
|
736
|
+
#--}}}
|
737
|
+
end
|
738
|
+
def signal_feeder sig
|
739
|
+
#--{{{
|
740
|
+
feeder = Feeder::new self
|
741
|
+
pidfilepath = feeder.gen_pidfilepath
|
742
|
+
pid = Integer(IO::read(pidfilepath)) rescue nil
|
743
|
+
begin
|
744
|
+
Process::kill(sig, pid)
|
745
|
+
pid
|
746
|
+
rescue
|
747
|
+
nil
|
748
|
+
end
|
749
|
+
#--}}}
|
750
|
+
end
|
751
|
+
# parses '-' from cmdline, but not if it's after a '--'
|
752
|
+
def parse_stdin
|
753
|
+
#--{{{
|
754
|
+
dash_dash, dash = %w( -- - ).map{|d| @argv.index d}
|
755
|
+
if dash
|
756
|
+
if dash_dash
|
757
|
+
if dash < dash_dash
|
758
|
+
@argv.delete '-'
|
759
|
+
STDIN
|
760
|
+
end
|
761
|
+
else
|
762
|
+
@argv.delete '-'
|
763
|
+
STDIN
|
764
|
+
end
|
765
|
+
end
|
766
|
+
#--}}}
|
767
|
+
end
|
768
|
+
# uses OPTSPEC to parse command line switches
|
769
|
+
def parse_options
|
770
|
+
#--{{{
|
771
|
+
@op = OptionParser.new
|
772
|
+
@options = {}
|
773
|
+
OPTSPEC.each do |spec|
|
774
|
+
k = spec.first.gsub(%r/(?:--)|(?:=.*$)|(?:\s+)/o,'')
|
775
|
+
@op.def_option(*spec){|v| v = v.to_s; @options[k] = v.empty? ? nil : v}
|
776
|
+
#@op.def_option(*spec){|v| @options[k] = v}
|
777
|
+
end
|
778
|
+
|
779
|
+
if((env_opts = (ENV['RQ_OPTS'] || ENV['RQ_OPTIONS'])))
|
780
|
+
require 'shellwords'
|
781
|
+
@op.parse! Shellwords.shellwords(env_opts)
|
782
|
+
end
|
783
|
+
|
784
|
+
@op.parse! @argv
|
785
|
+
|
786
|
+
@options
|
787
|
+
#--}}}
|
788
|
+
end
|
789
|
+
# initialize logging object - all classes then use this object
|
790
|
+
def init_logging
|
791
|
+
#--{{{
|
792
|
+
log, log_age, log_size, verbosity =
|
793
|
+
@options.values_at 'log', 'log_age', 'log_size', 'verbosity'
|
794
|
+
log_age = atoi log_age rescue nil
|
795
|
+
log_size = atoi log_size rescue nil
|
796
|
+
$logger = @logger = Logger::new(log || STDERR, log_age, log_size)
|
797
|
+
#
|
798
|
+
# hack to fix Logger sync bug
|
799
|
+
#
|
800
|
+
@logger.class.instance_eval do
|
801
|
+
attr :logdev unless @logger.respond_to?(:logdev)
|
802
|
+
end
|
803
|
+
|
804
|
+
@logdev = @logger.logdev.dev
|
805
|
+
@logdev.sync = true
|
806
|
+
level = nil
|
807
|
+
verbosity ||= 'info'
|
808
|
+
verbosity =
|
809
|
+
case verbosity
|
810
|
+
when /^\s*(?:4|d|debug)\s*$/io
|
811
|
+
level = 'Logging::DEBUG'
|
812
|
+
4
|
813
|
+
when /^\s*(?:3|i|info)\s*$/io
|
814
|
+
level = 'Logging::INFO'
|
815
|
+
3
|
816
|
+
when /^\s*(?:2|w|warn)\s*$/io
|
817
|
+
level = 'Logging::WARN'
|
818
|
+
2
|
819
|
+
when /^\s*(?:1|e|error)\s*$/io
|
820
|
+
level = 'Logging::ERROR'
|
821
|
+
1
|
822
|
+
when /^\s*(?:0|f|fatal)\s*$/io
|
823
|
+
level = 'Logging::FATAL'
|
824
|
+
0
|
825
|
+
else
|
826
|
+
abort "illegal verbosity setting <#{ verbosity }>"
|
827
|
+
end
|
828
|
+
@logger.level = 2 - ((verbosity % 5) - 2)
|
829
|
+
#debug {"logging level <#{ level }>"}
|
830
|
+
@logger
|
831
|
+
#--}}}
|
832
|
+
end
|
833
|
+
# initialize configuration file - not currenlty utilized
|
834
|
+
def init_config
|
835
|
+
#--{{{
|
836
|
+
@config =
|
837
|
+
if @options['config']
|
838
|
+
ConfigFile::new(@options['config'])
|
839
|
+
else
|
840
|
+
ConfigFile::any CONFIG_DEFAULT_PATH, CONFIG_SEARCH_PATH
|
841
|
+
end
|
842
|
+
debug { "config.path <#{ @config.path }>" }
|
843
|
+
@config
|
844
|
+
#--}}}
|
845
|
+
end
|
846
|
+
# generate a template/sample config file which can then be edited
|
847
|
+
def gen_template template
|
848
|
+
#--{{{
|
849
|
+
ConfigFile::gen_template(template)
|
850
|
+
self
|
851
|
+
#--}}}
|
852
|
+
end
|
853
|
+
#--}}}
|
854
|
+
end
|
855
|
+
end
|
856
|
+
|
857
|
+
#
|
858
|
+
# run main program unless included as a library (testing purposes)
|
859
|
+
#
|
860
|
+
RQ::Main::new ARGV, ENV
|