예제 #1
0
    def __init__(self,
                 settings,
                 logger,
                 conn=None,
                 token=None,
                 activity_task=None):
        activity.activity.__init__(self, settings, logger, conn, token,
                                   activity_task)

        self.name = "ConverterSVGtoJPG"
        self.version = "1"
        self.default_task_heartbeat_timeout = 30
        self.default_task_schedule_to_close_timeout = 60 * 5
        self.default_task_schedule_to_start_timeout = 30
        self.default_task_start_to_close_timeout = 60 * 5
        self.description = "Extract base64 image data from SVG and save as JPG: Download a S3 object from the elife-articles bucket, unzip if necessary, convert each, and save to the elife-cdn bucket."

        # Create the filesystem provider
        self.fs = fslib.Filesystem(self.get_tmp_dir())

        self.elife_id = None
        self.document = None

        self.subfolder = 'jpg'
        self.content_type = 'image/jpeg'
    def __init__(self,
                 settings,
                 logger,
                 conn=None,
                 token=None,
                 activity_task=None):
        activity.activity.__init__(self, settings, logger, conn, token,
                                   activity_task)

        self.name = "UnzipArticleSuppl"
        self.version = "1"
        self.default_task_heartbeat_timeout = 30
        self.default_task_schedule_to_close_timeout = 60 * 5
        self.default_task_schedule_to_start_timeout = 30
        self.default_task_start_to_close_timeout = 60 * 30
        self.description = "Download a S3 object from the elife-articles bucket, unzip if necessary, and save to the elife-cdn bucket."

        # Create the filesystem provider
        self.fs = fslib.Filesystem(self.get_tmp_dir())

        self.elife_id = None
        self.document = None

        self.subfolder = 'suppl'
        self.content_type = None
    def __init__(self,
                 settings,
                 logger,
                 conn=None,
                 token=None,
                 activity_task=None):
        activity.activity.__init__(self, settings, logger, conn, token,
                                   activity_task)

        self.name = "ArticleToFluidinfo"
        self.version = "1"
        self.default_task_heartbeat_timeout = 30
        self.default_task_schedule_to_close_timeout = 60 * 10
        self.default_task_schedule_to_start_timeout = 30
        self.default_task_start_to_close_timeout = 60 * 5
        self.description = "Publish article to Fluidinfo"

        # Activity specific properties
        self.document = None
        self.content = None
        self.a = None

        # Where we specify the library to be imported
        self.elife_api_prototype = None

        # Import the libraries we will need
        self.import_imports()

        # Create the filesystem provider
        self.fs = fslib.Filesystem(self.get_tmp_dir())
예제 #4
0
    def __init__(self,
                 settings,
                 logger,
                 conn=None,
                 token=None,
                 activity_task=None):
        activity.activity.__init__(self, settings, logger, conn, token,
                                   activity_task)

        self.name = "LensArticle"
        self.version = "1"
        self.default_task_heartbeat_timeout = 30
        self.default_task_schedule_to_close_timeout = 60 * 5
        self.default_task_schedule_to_start_timeout = 30
        self.default_task_start_to_close_timeout = 60 * 5
        self.description = "Create a lens article index.html page for the particular article."

        # Create the filesystem provider
        self.fs = fslib.Filesystem(self.get_tmp_dir())

        # Templates provider
        self.templates = templatelib.Templates(settings, self.get_tmp_dir())

        # article data provider
        self.article = articlelib.article(settings, self.get_tmp_dir())

        # Default templates directory
        self.from_dir = "template"

        # CDN bucket
        self.cdn_bucket = settings.publishing_buckets_prefix + settings.ppp_cdn_bucket
예제 #5
0
 def get_fs(self):
     """
     For running tests, return the filesystem provider
     so it can be interrogated
     """
     if self.fs is None:
         # Create the filesystem provider
         self.fs = fslib.Filesystem(self.get_tmp_dir())
     return self.fs
예제 #6
0
    def __init__(self,
                 settings,
                 logger,
                 conn=None,
                 token=None,
                 activity_task=None):
        activity.activity.__init__(self, settings, logger, conn, token,
                                   activity_task)

        self.name = "LensArticle"
        self.version = "1"
        self.default_task_heartbeat_timeout = 30
        self.default_task_schedule_to_close_timeout = 60 * 5
        self.default_task_schedule_to_start_timeout = 30
        self.default_task_start_to_close_timeout = 60 * 5
        self.description = "Create a lens article index.html page for the particular article."

        # Create the filesystem provider
        self.fs = fslib.Filesystem(self.get_tmp_dir())
예제 #7
0
    def __init__(self,
                 settings,
                 logger,
                 conn=None,
                 token=None,
                 activity_task=None):
        activity.activity.__init__(self, settings, logger, conn, token,
                                   activity_task)

        self.name = "LensDocumentsJS"
        self.version = "1"
        self.default_task_heartbeat_timeout = 30
        self.default_task_schedule_to_close_timeout = 60 * 5
        self.default_task_schedule_to_start_timeout = 30
        self.default_task_start_to_close_timeout = 60 * 5
        self.description = "Create the eLife Lens documents file in JSON and JSONP, and then save those to the S3 CDN bucket."

        # Create the filesystem provider
        self.fs = fslib.Filesystem(self.get_tmp_dir())
예제 #8
0
    def __init__(self,
                 settings,
                 logger,
                 conn=None,
                 token=None,
                 activity_task=None):
        activity.activity.__init__(self, settings, logger, conn, token,
                                   activity_task)

        self.name = "LensXMLFilesList"
        self.version = "1"
        self.default_task_heartbeat_timeout = 30
        self.default_task_schedule_to_close_timeout = 60 * 5
        self.default_task_schedule_to_start_timeout = 30
        self.default_task_start_to_close_timeout = 60 * 5
        self.description = "Create the eLife Lens xml list file for cache warming, and then save those to the S3 CDN bucket."

        # Data provider
        self.db = dblib.SimpleDB(settings)

        # Create the filesystem provider
        self.fs = fslib.Filesystem(self.get_tmp_dir())
예제 #9
0
def i_create_a_filesystem_provider(step):
    world.fs = fslib.Filesystem(world.tmp_dir)
    assert world.fs is not None, \
      "Got fs %s" % world.fs