Skip to content

Instantly share code, notes, and snippets.

@RobGThai
Last active April 11, 2017 17:19
Show Gist options
  • Select an option

  • Save RobGThai/42eba4c73f78ee48c9c92e76231ac42f to your computer and use it in GitHub Desktop.

Select an option

Save RobGThai/42eba4c73f78ee48c9c92e76231ac42f to your computer and use it in GitHub Desktop.

Revisions

  1. RobGThai revised this gist Apr 11, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion error
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    Apr 11 22:46:10 tdc-ops-swf-02 account-server: ERROR __call__ error with PUT /sde/3306/AUTH_d15d1d32336c4ad4b9055c99a4dc34aa/PRD_20170411_M : LockTimeout (3s) /srv/node/sde/accounts/3306/ae2/cead29b1808e23f8c1668c5abe1f8ae2/.lock (txn: txf5dc7a70c023432caf6c3-0058ecfa3f)
    Apr 11 22:46:10 tdc-ops-swf-02 account-server: ERROR __call__ error with PUT /sde/3306/AUTH_abcdefghi12345/PRD_20170411_M : LockTimeout (3s) /srv/node/sde/accounts/3306/ae2/cead29b1808e23f8c1668c5abe1f8ae2/.lock (txn: txf5dc7a70c023432caf6c3-0058ecfa3f)
  2. RobGThai created this gist Apr 11, 2017.
    1 change: 1 addition & 0 deletions error
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    Apr 11 22:46:10 tdc-ops-swf-02 account-server: ERROR __call__ error with PUT /sde/3306/AUTH_d15d1d32336c4ad4b9055c99a4dc34aa/PRD_20170411_M : LockTimeout (3s) /srv/node/sde/accounts/3306/ae2/cead29b1808e23f8c1668c5abe1f8ae2/.lock (txn: txf5dc7a70c023432caf6c3-0058ecfa3f)
    18 changes: 18 additions & 0 deletions upload.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    def upload(self, container_name, treasures):
    """
    Upload file to specify container.
    :param container_name: Fullpath to the folder to store the objects in.
    Started at container.
    :param objects_to_upload: A list of treasure to upload.
    :returns: List of ChestResult objects each represent
    the result of an upload.
    """
    upload_result = self.service.upload(
    container_name,
    [SwiftUploadObject(source=it.source, object_name=it.object_name)
    for it in treasures])
    return self.convert_result_list(
    self.populate_result,
    upload_result,
    ChestResult.action_upload_object)