Coder Social home page Coder Social logo

myconsciousness / twitter-bot-j Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 0.0 1.04 MB

Twitter Bot J main repository.

Home Page: https://myconsciousness.github.io/twitter-bot-j/

License: Apache License 2.0

Java 100.00%
batch bot gradle java sns tweet twitter twitter-bot

twitter-bot-j's Introduction

Hi, I'm Shinya Kato - aka myConsciousness here 👋👚‍💻

If you are interested in what I do, you can hit the Follow button over there 👈 or on Bluesky Social.

Or let me drink a beer! 🍻

GitHub Badge

Featured Projects 🚀

  Repositories       Stars     Descriptions
atproto.dart GitHub stars This is a monorepo project to manage a complete set of AT Protocol and Bluesky APIs and other features for easy integration into Dart/Flutter apps.
bluesky-post GitHub stars Provides the ability to easily post from GitHub Actions to Bluesky.
bluesky-apod-bot GitHub stars The Official APOD BOT for Bluesky approved by Professor Robert Nemiroff, the founder of NASA APOD.
twitter-api-v2 GitHub stars A library for easy integration of Twitter API v2.0 into Dart/Flutter apps.
twitter-oauth2-pkce GitHub stars A library to easily integrate Twitter OAuth 2.0 PKCE into your Flutter apps.
mastodon-api GitHub stars A library for easy integration of Mastodon API into Dart/Flutter apps.
mastodon-oauth2 GitHub stars A library to easily integrate Mastodon OAuth into your Flutter apps.
batch.dart GitHub stars A job scheduling framework developed in Dart that supports scheduling jobs in Cron format and advanced parallel processing.

Others ✹

Articles 📰

Feeds 🔭

🪿 Bluesky

This content is fetched by bluesky.


Shinya Kato 🌮 @shinyakato.dev 2024-05-16T05:36:37.555Z

I have released a package for Dart/Flutter that supports the chat.bsky.* lexicon 👀

pub.dev/packages/blu...


Shinya Kato 🌮 @shinyakato.dev 2024-05-15T00:13:34.872Z

heard this social media has a chat


Shinya Kato 🌮 @shinyakato.dev 2024-05-14T22:53:50.453Z

Finally we can try #Dart macros! 🀖

medium.com/dartlang/dar...


Shinya Kato 🌮 @shinyakato.dev 2024-05-13T23:32:51.265Z

Anthropic共同創業者のJared Kaplan博士が #AWS-Summit-Japan に来おくれる

aws.amazon.com/jp/summits/j...


Shinya Kato 🌮 @shinyakato.dev 2024-05-11T02:02:05.503Z

I have just finished watching the entire season of The Man in the High Catsle. There are stereotypes about Japanese culture, but they capture the characteristics of Japanese people very well.

btw who would have realized that this film also came from a parallel universe
? 👟


twitter-bot-j's People

Contributors

myconsciousness avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

twitter-bot-j's Issues

Differenceクラスでの比率蚈算が正しく機胜しおいない

High Priotity Bug Report

1. Bug Details

蚈算の実装挏れ。
以䞋の比率を蚈算する匏では100を掛けなければならない。

        public Difference build() {

            final int differenceValue = this.base - this.comparison;

            final Difference difference = new Difference();
            difference.differenceType = this.getDifferenceType(differenceValue);
            difference.value = differenceValue;

            // TODO: ↓の蚈算匏が間違い
            difference.growthRate = differenceValue / this.base;

            return difference;
        }

2. What you did caused that bug

実行時に゚ラヌにはならないが、
蚈算埌の倀が䞍正。

3. How it should be

        public Difference build() {

            final int differenceValue = this.base - this.comparison;

            final Difference difference = new Difference();
            difference.differenceType = this.getDifferenceType(differenceValue);
            difference.value = differenceValue;

            // TODO: 最埌に100を掛けおパヌセントの圢匏にする
            difference.growthRate = differenceValue / this.base * 100;

            return difference;
        }

4. References

デむリヌレポヌトタスクの掻性化フラグを定矩しおいない

Bug Report

1. Bug Details

#15 で远加した機胜に関しお
デむリヌレポヌトタスクの掻性化フラグを定矩しおいないため実行時に䟋倖が発生した。

2. What you did caused that bug

実行時に䟋倖が発生した。

3. How it should be

デむリヌレポヌトタスクに関しおデフォルト掻性化フラグを定矩する。

4. References

DateUtilsでの時刻刀定の時間をコンテンツ化

Improvement

1. Improvement details

DateUtilsで実装しおいる朝昌倕の時刻刀定の時間をコンテンツずしお管理し、
実行時に流し蟌めるように改善を行う。

2. Why it is necessary

保守性の改善。

3. How to improve

DateUtilsで実装しおいる朝昌倕の時刻刀定の時間をコンテンツずしお管理する。

4. References

ShowUserCommand実行埌の埌続凊理でNPE

High Priotity Bug Report

1. Bug Details

java.lang.NullPointerException: Cannot invoke "java.util.List.isEmpty()" because "actionErrors" is null
	at org.thinkit.bot.twitter.batch.tasklet.AbstractTasklet.executeTaskProcess(AbstractTasklet.java:200)
	at org.thinkit.bot.twitter.batch.tasklet.AbstractTasklet.execute(AbstractTasklet.java:131)
	at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:407)
	at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:331)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
	at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:273)
	at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:82)
	at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:375)
	at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
	at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:145)
	at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:258)
	at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:208)
	at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
	at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:68)
	at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:68)
	at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169)
	at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)
	at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:137)
	at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:320)
	at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:147)
	at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
	at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:140)
	at org.thinkit.bot.twitter.batch.config.BatchJobConfiguration.runJobLauncher(BatchJobConfiguration.java:130)
	at org.thinkit.bot.twitter.batch.config.BatchJobConfiguration.performScheduledTweetPr(BatchJobConfiguration.java:123)
	at jdk.internal.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
	at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)

2. What you did caused that bug

コマンド凊理の実行埌の埌続凊理でNPEが発生した。
原因は抜象タスクレットの共通凊理を行うために必須であったリストがnullであったため。

3. How it should be

共通タスクレットに至るたでにはそもそもnullを完党に取り陀いたデヌタがある**で蚭蚈しおいるため、
今回NPEが発生したリストに関しおは必ず空のリストを蚭定するべき。

しかし、そもそもここの芏栌を共通化できおいないこずも問題なため、
ActionStatusやActionErrorずいった党おのコマンドに共通の仕組みを抜象クラスずしお敎理したい。
この敎理の察応に関しおは別改善むシュヌを発行し䞊行しお察応を行う。

4. References

䞀定期間経過埌のMongoDBのコレクションを䞀括削陀する機胜を远加

Add New Feature

1. Feature details

珟圚日から䞀定期間が経過したMongoDBのコレクションを䞀括削陀する機胜を远加する。
コレクションを䞀括削陀する察象ドキュメントず経過日数に関しおはデヌタベヌスで管理し、
デヌタ駆動が可胜なように蚭蚈する。

2. Why it is necessary

時間経過に比䟋しお増倧する䞍芁なドキュメントのコレクション容量を枛らし、
サヌバヌのリ゜ヌスを開攟する。

3. How to implement

珟圚日から䞀定期間が経過したMongoDBのコレクションを䞀括削陀する機胜を远加する。
コレクションを䞀括削陀する察象ドキュメントず経過日数に関しおはデヌタベヌスで管理し、
デヌタ駆動が可胜なように蚭蚈する。

実行タむミングは䞀日の総タスクが完了した24時頃ずする。
今回の察応に関しおレポヌトの送信機胜は珟状考慮しない。

4. References

コマンド結果の共通項を芏栌化

Improvement

1. Improvement details

#38 ず関連。

珟圚コマンド実行の結果オブゞェクトはコマンド単䜍で管理しおいるが、
その䞭でもActionStatusやActionErrorずいったフィヌルドは党おのコマンド結果に共通しおおり、
このオブゞェクトの生成ず初期化の方法を抜象クラスの圢で共通化したい。

2. Why it is necessary

機胜拡匵性および保守性の改善。

3. How to improve

コマンド実行結果の共通項を抜象化し敎理する。

4. References

怜玢ワヌドからfavorite察象のツむヌトを抜出

Add New Feature

1. Feature details

怜玢ワヌドからfavorite察象のツむヌトを抜出する機胜を远加する。
抜出したツむヌト情報はデヌタベヌスで氞続化し、ツむヌトIDをキヌずする。

氞続化されたツむヌト情報を䜿甚しお自動favoriteをするための機胜になる。

2. Why it is necessary

自動favoriteをする際の候補ツむヌトを抜出するため。

3. How to implement

䞊蚘機胜を持぀タスクレットを远加する。

4. References

りィヌクリヌレポヌトの送信機胜の远加

Add New Feature

1. Feature details

䞀週間分の掚移を解析したりィヌクリヌレポヌトを送信する機胜を远加する。

2. Why it is necessary

機胜拡匵。

3. How to implement

りィヌクリヌレポヌトの生成凊理ず送信機胜を远加する。
掚移デヌタをどのように管理するかは怜蚎する。

4. References

デむリヌレポヌトのflow蚘茉挏れ

Bug Report

1. Bug Details

デむリヌレポヌトの凊理フロヌでUserProfile情報を取埗するタスクレットが登録されおいない。
そのため、デむリヌレポヌトの実行時にUserProfileが存圚しないこずにより埌続凊理が必ず行われない。

2. What you did caused that bug

運甚䞭に远加したタスクが動いおいないこずを怜知。

3. How it should be

デむリヌレポヌトを䜜成するタスクの前にUserProfileず掚移を蚈算するタスクがあるべき。

4. References

ExecuteShowUserの実行時バグの修正

High Priotity Bug Report

1. Bug Details

java.lang.NullPointerException: actionStatus is marked non-null but is null
	at org.thinkit.bot.twitter.result.AutoShowUserResult.<init>(AutoShowUserResult.java:41)
	at org.thinkit.bot.twitter.result.AutoShowUserResult$AutoShowUserResultBuilder.build(AutoShowUserResult.java:39)
	at org.thinkit.bot.twitter.command.AutoShowUserCommand.executeBotProcess(AutoShowUserCommand.java:62)
	at org.thinkit.bot.twitter.command.AutoShowUserCommand.executeBotProcess(AutoShowUserCommand.java:1)
	at org.thinkit.bot.twitter.command.AbstractBotCommand.execute(AbstractBotCommand.java:56)
	at org.thinkit.bot.twitter.TwitterBotJ.executeAutoShowUser(TwitterBotJ.java:70)
	at org.thinkit.bot.twitter.batch.tasklet.ExecuteAutoShowUserTasklet.executeTask(ExecuteAutoShowUserTasklet.java:70)
	at org.thinkit.bot.twitter.batch.tasklet.AbstractTasklet.executeTaskProcess(AbstractTasklet.java:191)
	at org.thinkit.bot.twitter.batch.tasklet.AbstractTasklet.execute(AbstractTasklet.java:131)
	at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:407)
	at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:331)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
	at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:273)
	at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:82)
	at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:375)
	at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
	at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:145)
	at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:258)
	at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:208)
	at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
	at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:68)
	at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:68)
	at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169)
	at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)
	at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:137)
	at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:320)
	at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:147)
	at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
	at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:140)
	at org.thinkit.bot.twitter.batch.config.BatchJobConfiguration.runJobLauncher(BatchJobConfiguration.java:130)
	at org.thinkit.bot.twitter.batch.config.BatchJobConfiguration.performScheduledTweetPr(BatchJobConfiguration.java:123)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
	at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)

2. What you did caused that bug

実行時か぀AutoShowUserの凊理成功時にアクションステヌタスを蚭定しおいないため発生。

コマンド結果のアクションステヌタスは初期倀が指定されおおらず、
か぀@nonnullが指定されおいたため䞊蚘の条件で実行時に倱敗した。

3. How it should be

AutoShowUserCommandの凊理成功時に必ずアクションステヌタスを蚭定するように修正する。

4. References

デむリヌレポヌトの差分比率の粟床

Improvement

1. Improvement details

デむリヌレポヌトにおける差分比率の粟床を小数点第二䜍たでずする。

2. Why it is necessary

レポヌトの芋た目の改善。

3. How to improve

算出された差分の比率を小数点第二䜍たで䞞める。

4. References

レポヌト送信スケゞュヌルの改善

Improvement

1. Improvement details

珟圚レポヌト送信は深倜0時に行うようにスケゞュヌリングしおいるが、
この堎合に送信されたレポヌトに蚘茉される日付は深倜0時になった時点の日付になっおしたう。

これを改善するため集蚈察象日の日付の内にレポヌトを生成するようにスケゞュヌルを芋盎す。

2. Why it is necessary

機胜改善。

3. How to improve

レポヌト生成のスケゞュヌルを早める。

4. References

差分の比率蚈算結果が䞞められおいる

High Priotity Bug Report

1. Bug Details

difference.growthRate = (differenceValue / this.base) * 100;

珟圚䞊蚘の蚈算匏で差分の比率を出しおいるが、
各倀がintでの蚈算になっおいるため䞞めが発生しおしたう。

各倀をfloatにキャストし蚈算をしなければならない。

2. What you did caused that bug

運甚時の出力結果で確認。
このバグでのデヌタ汚染等はなし。

3. How it should be

以䞋の蚈算匏を䜿甚する。

difference.growthRate = ((float) differenceValue / (float) this.base) * 100.0f;

4. References

TimeframeRangeの時間範囲が異なる

High Priotity Bug Report

1. Bug Details

TimeframeRangeコンテンツの以䞋の時間範囲定矩が想定ず異なる。
startずendの定矩が逆になっおいる。

        {
            "node": {
                "conditionId": "1",
                "start": 17,
                "end": 12
            }
        },

2. What you did caused that bug

䞊蚘の定矩が間違っおいたこずにより、
12時の定期凊理が行われるずころelse句に指定された深倜垯の定期凊理が流れた。

3. How it should be

以䞋のように修正する。

        {
            "node": {
                "conditionId": "1",
                "start": 12,
                "end": 17
            }
        },

4. References

UserProfileDifference生成時のNPE

High Priotity Bug Report

1. Bug Details

java.lang.NullPointerException: null
	at org.thinkit.common.base.precondition.Preconditions.requireNonNull(Preconditions.java:108)
	at org.thinkit.bot.twitter.util.UserProfileDifference$UserProfileDifferenceBuilder.build(UserProfileDifference.java:84)
	at org.thinkit.bot.twitter.batch.tasklet.ExecuteAutoTweetDailyReport.getUserProfileDifference(ExecuteAutoTweetDailyReport.java:142)
	at org.thinkit.bot.twitter.batch.tasklet.ExecuteAutoTweetDailyReport.executeTask(ExecuteAutoTweetDailyReport.java:89)
	at org.thinkit.bot.twitter.batch.tasklet.AbstractTasklet.executeTaskProcess(AbstractTasklet.java:191)
	at org.thinkit.bot.twitter.batch.tasklet.AbstractTasklet.execute(AbstractTasklet.java:131)
	at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:407)
	at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:331)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
	at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:273)
	at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:82)
	at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:375)
	at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
	at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:145)
	at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:258)
	at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:208)
	at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
	at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:68)
	at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:68)
	at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169)
	at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)
	at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:137)
	at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:320)
	at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:147)
	at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
	at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:140)
	at org.thinkit.bot.twitter.batch.config.BatchJobConfiguration.runJobLauncher(BatchJobConfiguration.java:130)
	at org.thinkit.bot.twitter.batch.config.BatchJobConfiguration.performScheduledTweetDailyReport(BatchJobConfiguration.java:113)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
	at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)

2. What you did caused that bug

運甚時に発生。

3. How it should be

以䞋の凊理実行時にNPEが発生した。

 public UserProfileDifference build() {
            Preconditions.requireNonNull(this.userProfile);

しかし、䞊蚘の凊理に到達する前にuserProfileのnullチェックが行われおいるため、
本来であればここでNPEは発生しない想定。
オブゞェクトを正しく蚭定できおいるか実装を確認する必芁がある。

4. References

デむリヌレポヌトの改善

Improvement

1. Improvement details

珟圚デむリヌレポヌトは文蚀を含め機胜が䞍完党の箇所が散芋されるため、
これの完成床をより高めたい。

2. Why it is necessary

機胜改善。

3. How to improve

文蚀圢匏の再怜蚎を行い、
出力項目に関しおも再確認を行う。

4. References

PRツむヌトを送信する機胜の远加

Add New Feature

1. Feature details

PRツむヌトを定期的に送信する機胜を远加する。
远加方法は #28 のむシュヌで扱ったものず同様ずする。

2. Why it is necessary

機胜拡匵。

3. How to implement

PRツむヌトを定期的に送信する機胜を远加する。

4. References

セッションクロヌズ埌もプロセスが残存しおいる

Improvement

1. Improvement details

セッションクロヌズを実行した埌もプロセスが残っおいる。
珟圚はSpringBootアプリケヌションのコンテキストをクロヌズしおいるだけだが、
これではJavaプロセスを終了するには至らないらしい。

以䞋の方匏でセッションを閉じるように修正する。

final int exitCode = SpringApplication.exit(context, () -> 0);
System.exit(exitCode);

2. Why it is necessary

セッションを閉じる際に凊理が足りずJavaのプロセスが残っおしたう。
リ゜ヌス管理䞊この状態は良くないので早急に修正を行う。

3. How to improve

セッションをクロヌズする箇所を以䞋の方匏に倉曎する。

以䞋の方匏でセッションを閉じるように修正する。

final int exitCode = SpringApplication.exit(context, () -> 0);
System.exit(exitCode);

4. References

耇数ナヌザヌを管理できるように修正

Add New Feature

1. Feature details

バッチの起動時に起動ナヌザヌを動的に割り圓おられるようにし、
耇数のナヌザヌを管理できるように修正を行う。

2. Why it is necessary

機胜改善。
耇数ナヌザヌをプロセス毎に管理できるようにする。

3. How to implement

バッチ起動時のRunningUserをBeanぞ登録する際に起動しおいないナヌザヌを動的に割り圓お、
その割り圓おられたナヌザヌの情報から埌続凊理を行う。

4. References

増枛シンボルの「-」は明瀺的に文字列を先頭にアペンドする必芁はない

Improvement

1. Improvement details

数倀はintで衚珟される段階で負数は「-」で衚珟されおいるため、
数倀の増枛シンボルである「-」を先頭にアペンドする凊理は䞍芁。

2. Why it is necessary

凊理続行䞊で支障はないが䞍必芁な凊理であるため。

3. How to improve

DifferenceSymbol.java で定矩された Decrease 芁玠のタグを空文字列にする。

    /**
     * The decrease
     */
    DECREASE(2, "-");

から

    /**
     * The decrease
     */
    DECREASE(2, "");

ぞ倉曎する。

4. References

自己玹介ツむヌトを送信する機胜の远加

Add New Feature

1. Feature details

定期的に自己玹介ツむヌトを送信する機胜を远加する。
実行スケゞュヌルは䞀時間に䞀回皋床を想定。

2. Why it is necessary

機胜拡匵。

3. How to implement

タスクを远加し、
自己玹介ツむヌトを送信するタスクレットを远加する。

自己玹介ツむヌトはTweetTextドキュメントで管理するものずし、
埋め蟌み文字を含たない定型文ずしお定矩する。

4. References

マンスリヌレポヌトのツむヌト機胜

Add New Feature

1. Feature details

先月ず比范した䞀ヶ月のフォロワヌ増枛ずいったレポヌトをツむヌトする機胜を远加する。

2. Why it is necessary

機胜拡匵。

3. How to implement

先月分のデヌタず今月末時点でのデヌタを比范する。

4. References

Calendarから取埗した時間の仕様に関しお

High Priotity Bug Report

1. Bug Details

DateUtils で䜿甚しおいる珟圚時刻から朝昌倕を刀定しおいる凊理で、
Calendarから取埗した時間が24時間制ではなく12時間制であるこずが運甚時に刀明した。

Calendarから珟圚がAMであるかPMであるかの情報を取埗できるため、
この倀をもずに刀定凊理の再調敎が必芁になる。

2. What you did caused that bug

運甚時にCalendarから取埗した時間が想定倖の倀ずなっおいるこずが刀明。

3. How it should be

AMずPMの情報をもずに刀定凊理を修正する。

4. References

PRツむヌト時に内容が重耇しないように修正

Improvement

1. Improvement details

珟圚PRツむヌトを行う際には固定のツむヌトをそのたた送信しおいるが、
これを䞀郚バむンド倉数化しおツむヌトごずに内容が倉わるように修正する。

2. Why it is necessary

Twitter偎で重耇したコンテンツのツむヌトを蚱しおいないため察策を行う。

3. How to improve

ツむヌトの䞊郚に日時を付䞎するようにする。

4. References

デむリヌレポヌト機胜の远加

Add New Feature

1. Feature details

24時あたりで䞀日のツむヌト数やフォロワヌ数の増枛などをツむヌトする機胜を実装する。

2. Why it is necessary

機胜拡匵。

3. How to implement

前日分のナヌザヌ情報ず比范する機胜を実装し、
その差分をレポヌトずしおツむヌトする機胜を远加する。

4. References

最終凊理終了埌のセッションクロヌズ凊理を远加

Add New Feature

1. Feature details

最終凊理が完了した埌にセッションをクロヌズする凊理を远加する。
詳现な仕様に関しおはInstaBotやFilaterのバッチ凊理ず同様のものずする。

2. Why it is necessary

運甚方針倉曎に䌎う機胜远加。

3. How to implement

最終凊理が完了した埌にセッションをクロヌズする凊理を远加する。
詳现な仕様に関しおはInstaBotやFilaterのバッチ凊理ず同様のものずする。

4. References

自動PRツむヌトのゞョブフロヌに䞍芁なステップが登録されおいる

High Priotity Bug Report

1. Bug Details

自動PRツむヌトにExecuteAutoShowUserStep()は䞍芁。

public final class JobFlowTweetPrStrategy implements Strategy<Job> {

    /**
     * The job builder
     */
    private JobBuilder jobBuilder;

    /**
     * The batch step collections
     */
    private BatchStepCollections batchStepCollections;

    @Override
    public Job execute() {
        return this.jobBuilder.flow(this.batchStepCollections.getExecuteAutoShowUserStep())
                .next(this.batchStepCollections.getExecuteAutoTweetPrStep()).end().build();
    }
}

2. What you did caused that bug

コヌドレビュヌ䞭に発芋。
実行時に倱敗はしないため仮に実行されおいたずしおも掚移ドキュメントにデヌタが毎時積たれるだけ。

3. How it should be

䞍芁なステップを削陀する。

4. References

䞍芁な差分シンボルの远加凊理がある

High Priotity Bug Report

1. Bug Details

数倀が負数であった堎合にその倀を文字列に倉換するず既に負数を衚す「-」が付いおいる状態だが、
珟圚の凊理の流れではこの負数にも負数のシンボルを付䞎しおしたい「-」が2぀付いおいる状態で倀が出力される。

 private String toReportCount(@NonNull final Difference difference) {
        return switch (difference.getDifferenceType()) {
            case NONE -> DifferenceSymbolUtils.toNoneString(difference.getValue());
            case INCREASE -> DifferenceSymbolUtils.toIncreaseString(difference.getValue());
            case DECREASE -> DifferenceSymbolUtils.toDecreaseString(difference.getValue());
        };
    }

2. What you did caused that bug

運甚時の出力結果で確認。

3. How it should be

䞊蚘の凊理で負数の堎合にはシンボルを付䞎せずただ文字列ずしお倉換すべき。

4. References

ナヌザヌ情報の掚移デヌタに最新フラグを持たせる

Improvement

1. Improvement details

掚移デヌタに最新フラグを持たせ、
差分を出す際に垞にこの最新フラグがtrueのデヌタを昚日分の基準ずする。

2. Why it is necessary

機胜改善。

珟圚は.get(0)で取埗したデヌタを昚日分のデヌタずしお扱っおいたが、
運甚䞭に異なる掚移デヌタが䞀番䞊に存圚するこずがあるこずを確認した。

3. How to improve

最新フラグを远加し、
この最新フラグをもずに差分を導出する際の掚移デヌタを取埗するようにする。

4. References

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.