Class S3StartupTasks

java.lang.Object
org.localify.common.S3StartupTasks
All Implemented Interfaces:
org.springframework.boot.CommandLineRunner

@Component @ConditionalOnProperty(prefix="localify.rec-sys", name="load-uploader", havingValue="true") public class S3StartupTasks extends Object implements org.springframework.boot.CommandLineRunner
A component for running S3-related startup tasks. This is used for uploading data to S3 for the recommendation system.
  • Constructor Details

    • S3StartupTasks

      @Autowired public S3StartupTasks(LocalifyProperties properties, S3Uploader s3Uploader, RecommendService recommendService)
      Constructs a new S3StartupTasks.
      Parameters:
      properties - The application properties.
      s3Uploader - The S3 uploader.
      recommendService - The recommendation service.
  • Method Details

    • run

      public void run(String... args) throws Exception
      Specified by:
      run in interface org.springframework.boot.CommandLineRunner
      Throws:
      Exception
    • uploadS3ArtistInformation

      @Scheduled(cron="0 0 1 * * MON") public void uploadS3ArtistInformation()
      Uploads artist information to S3. This is scheduled to run every Monday at 1 AM.