This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Latest YouTube Videos | |
| on: | |
| schedule: | |
| # Runs every hour | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update-readme-with-youtube: | |
| name: Update this repo's README with latest videos from YouTube |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE IF NOT EXISTS shedlock( | |
| name VARCHAR(64) NOT NULL, | |
| locked_at TIMESTAMP NOT NULL, | |
| lock_until TIMESTAMP NOT NULL, | |
| locked_by VARCHAR(255) NOT NULL, | |
| PRIMARY KEY (name) | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.sample.spring.scheduler; | |
| import net.javacrumbs.shedlock.core.LockProvider; | |
| import net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider; | |
| import net.javacrumbs.shedlock.spring.annotation.EnableSchedulerLock; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import javax.sql.DataSource; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.sample.spring; | |
| import lombok.extern.slf4j.Slf4j; | |
| import net.javacrumbs.shedlock.spring.annotation.SchedulerLock; | |
| import org.springframework.core.env.Environment; | |
| import org.springframework.scheduling.annotation.Scheduled; | |
| import org.springframework.stereotype.Component; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.spring.redis.streams.repository; | |
| import com.spring.redis.streams.dto.Movie; | |
| import com.spring.redis.streams.dto.MovieDetails; | |
| import org.springframework.stereotype.Repository; | |
| import java.util.List; | |
| import java.util.Random; | |
| import java.util.concurrent.ThreadLocalRandom; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.spring.redis.streams.publisher; | |
| import com.spring.redis.streams.dto.MovieDetails; | |
| import com.spring.redis.streams.repository.MovieRepository; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.data.redis.connection.stream.ObjectRecord; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.spring.redis.streams.config; | |
| import com.spring.redis.streams.dto.MovieDetails; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.spring.redis.streams.config; | |
| import com.spring.redis.streams.dto.MovieDetails; | |
| import lombok.SneakyThrows; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.data.redis.connection.stream.ObjectRecord; | |
| import org.springframework.data.redis.core.ReactiveRedisTemplate; | |
| import org.springframework.data.redis.stream.StreamListener; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3' | |
| services: | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| redis-commander: | |
| image: rediscommander/redis-commander:latest | |
| depends_on: | |
| - redis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3' | |
| services: | |
| master: | |
| container_name: master | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| slave-a: | |
| container_name: slave-a | |
| image: redis |