aboutsummaryrefslogtreecommitdiff
path: root/lib/App/Glacier/Command/Get.pm
AgeCommit message (Collapse)AuthorFiles
2018-12-19Bugfixes.Sergey Poznyakoff1
* lib/App/Glacier/Command.pm (option,check_job): New methods. * lib/App/Glacier/Command/Get.pm: Rewrite debug messages (fixes temporary solution in 6c6dab5d). * lib/App/Glacier/Command/Jobs.pm: Rewrite the db->foreach sub. * lib/App/Glacier/Command/Periodic.pm: Likewise. * lib/App/Glacier/DB/GDBM.pm (CLONE_SKIP): New method. * lib/App/Glacier/Job.pm: Overload the "" operator. * lib/App/Glacier/Roster.pm (foreach): Overload method.
2018-12-16Provide intermediate Glacier APISergey Poznyakoff1
The class App::Glacier::Bre is a wrapper over Net::Amazon::Glacier that fixes several bugs in the parent class and provides graceful error handling using the App::Glacier::HttpCatch interface. For each Net::Amazon::Glacier method, it offers a corresponding method with capitalized name, that, instead of croaking on errors, sets up the error status and returns. Error status of the last method call is available via methods lasterr and last_error_message. Additionally, the methods of Net::Amazon::Glacier are available under their original names. * lib/App/Glacier/Bre.pm: New file. * lib/App/Glacier/Command.pm (glacier_eval,lasterr) (last_error_message): Remove. Use Bre API. * lib/App/Glacier/Command/CreateVault.pm: Use Bre API. * lib/App/Glacier/Command/DeleteFile.pm: Likewise. * lib/App/Glacier/Command/DeleteVault.pm: Likewise. * lib/App/Glacier/Command/Get.pm: Likewise. * lib/App/Glacier/Command/Jobs.pm: Likewise. * lib/App/Glacier/Command/ListVault.pm: Likewise. * lib/App/Glacier/Command/Periodic.pm: Likewise. * lib/App/Glacier/Command/Purge.pm: Likewise. * lib/App/Glacier/Command/Put.pm: Likewise. * lib/App/Glacier/Command/Sync.pm: Likewise. * lib/App/Glacier/Directory.pm: Likewise. * lib/App/Glacier/Job.pm: Use Bre API. Use the init method to initialize the job. * lib/App/Glacier/Job/ArchiveRetrieval.pm (init): New method. * lib/App/Glacier/Job/InventoryRetrieval.pm: Likewise.
2018-12-11Implement the 'periodic' commandSergey Poznyakoff1
* lib/App/Glacier.pm: Implement new command. * lib/App/Glacier/Command.pm: New configuration statement transfer.download.cachedir (archive_cache_filename): New method. * lib/App/Glacier/Command/Get.pm (run): Use cache file, if available. (_open_output): As a temporary solution, protect the call to $job->file_name by eval. * lib/App/Glacier/Command/Periodic.pm: New file. * lib/App/Glacier/Job.pm (fromdb): New class method. (cache_file): New method.
2018-03-06Provide a core class. Change inheritance graph.Sergey Poznyakoff1
* lib/App/Glacier/Core.pm: New file. * Makefile.PL: Get abstract and version from lib/App/Glacier.pm * glacier: Change App::Glacier creation. * lib/App/Glacier.pm: Inherit from App::Glacier::Core. * lib/App/Glacier/Command.pm: Likewise. Rewrite constructor. * lib/App/Glacier/Command/CreateVault.pm: Change run() method. * lib/App/Glacier/Command/DeleteFile.pm: Likewise. * lib/App/Glacier/Command/DeleteVault.pm: Likewise. * lib/App/Glacier/Command/Get.pm: Rewrite getopt method as new(). Change the run() method. * lib/App/Glacier/Command/Jobs.pm: Likewise. * lib/App/Glacier/Command/ListVault.pm: Likewise. * lib/App/Glacier/Command/Purge.pm: Likewise. * lib/App/Glacier/Command/Put.pm: Likewise. * lib/App/Glacier/Command/Sync.pm: Likewise. * lib/App/Glacier/Config.pm (new): Initialize debug and ci. * lib/App/Glacier/Job.pm: Inherit from App::Glacier::Core. * lib/App/Glacier/Job/FileRetrieval.pm: Likewise.
2018-02-24Version 1.00v1.00Sergey Poznyakoff1
2017-05-24Check for job expirationSergey Poznyakoff1
* glacier: Document the database.*.ttl statements * lib/App/Glacier/Command.pm (parameters): New database statements: "ttl" * lib/App/Glacier/Command/Get.pm (run): Fix malformed message. * lib/App/Glacier/Job.pm (new): New keyword argument ttl. (_get_job): Re-check completed job older than _ttl using describe_job. * lib/App/Glacier/Job/ArchiveRetrieval.pm (new): Pass additional data (including the description) via keyword arguments. * lib/App/Glacier/Job/FileRetrieval.pm (new): Pass ttl and description as keyword arguments. * lib/App/Glacier/Job/InventoryRetrieval.pm (new): Pass ttl
2017-05-23Document all commandsSergey Poznyakoff1
2017-05-23Implement progress meter; make number of retries configurable.Sergey Poznyakoff1
* lib/App/Glacier/Command.pm (parameters): New parameters: transfer.retries, transfer.upload.retries, and transfer.download.retries * lib/App/Glacier/Command/Get.pm: Implement progress meter. Make number of retries configurable. * lib/App/Glacier/Command/Put.pm: Likewise. * lib/App/Glacier/Progress.pm: New file.
2017-05-23get: improve part size computationSergey Poznyakoff1
* lib/App/Glacier/Command/Get.pm: Redo the part size calculation in the similar vein as in Put.pm Retry if downloading fails
2017-05-23Improve transfer configurationSergey Poznyakoff1
* lib/App/Glacier/Command.pm (ck_size): New function. New configuration file sections: [transfer], [transfer upload], and [transfer download] configure number of jobs and maximal size for single-part transfer operation. (cf_transfer_param, dry_run): New methods. (glacier_eval): Fix context evaluation. * lib/App/Glacier/Command/Get.pm: Rewrite using new cinfiguration parameters. Remove the --part-size option. Honor the dry_run setting. * lib/App/Glacier/Command/Put.pm: : Rewrite using new cinfiguration parameters. Honor the dry_run setting.
2017-05-22Fix multipart upload & downloadSergey Poznyakoff1
* lib/App/Glacier/Command/Get.pm: Fix chunk alignment and the use of shared variables. * lib/App/Glacier/Command/ListVault.pm: Fix typo. * lib/App/Glacier/Command/Put.pm (_upload_multipart): Rewrite. * lib/App/Glacier/DB/GDBM.pm: Don't keep the DB mapped through the lifetime of the object, as this interacts badly with the threaded code (it causes coredumps when the copies of the object are destroyed in their corresponding threads, which means that the underlying gdbm_close gets called multiple times on the same GDBM structure. See comment to the _tied method, for details).
2017-05-22Further fixes in get and syncSergey Poznyakoff1
* lib/App/Glacier/Command.pm (glacier_eval): Check for return context and return appropriate type. * lib/App/Glacier/Command/Get.pm (run): Minor simplification. (run): Delete failed jobs. (download): Revamp multi-part download algorithm. * lib/App/Glacier/Command/ListVault.pm (getopt): Use Command::set_time_style_option to set the --time-style option. * lib/App/Glacier/Command/Sync.pm (sync): Restart expired jobs. (_sync): Actually store the changed DB records. * lib/App/Glacier/DateTime.pm (format_can): New format: standard * lib/App/Glacier/Job.pm (new): Set _job => undef, to avoid spurious warnings. (_get_job): Handle invalidate for cached values as well (is_finished, status): New methods. (forget): Rename to delete.
2017-05-21Implement get and purgeSergey Poznyakoff1
* glacier: Register purge and get * lib/App/Glacier/Command.pm (getyn): New method. * lib/App/Glacier/Command/DeleteFile.pm: Don't invalidate directory on completion. * lib/App/Glacier/Command/Get.pm: New file. * lib/App/Glacier/Command/Purge.pm: New file. * lib/App/Glacier/Command/ListVault.pm (get_vault_inventory): Only check for DIR_PENDING. DIR_OUTDATED is mostly irrelevant, because the inventory can be as much as 24 hours old. * lib/App/Glacier/Command/Put.pm: Fix argument checking. Don't invalidate directory on completion. * lib/App/Glacier/Job.pm: Implement debugging. * lib/App/Glacier/Job/FileRetrieval.pm: Bugfixes.

Return to:

Send suggestions and report system problems to the System administrator.